欢迎来到建筑考试题库网 建筑考试题库官网
全部科目 > 微软认证考试 > MCITP > MCITP(70-640)

单项选择题

You have a Windows PowerShell script that contains the following code:  
import-csv Accounts.csv | Foreach {New-ADUser -Name $_.Name -Enabled $true -AccountPassword  $_.password}  
When you run the script, you receive an error message indicating that the format of the password is  incorrect. The script fails.  
You need to run a script that successfully creates the user accounts by using the password contained in  accounts.csv.  
Which script should you run()

    A.import-csv Accounts.csv Foreach {New-ADUser -Name $_.Name -Enabled $true -AccountPassword convertTo-SecureString "Password" -AsPlainText -force)}
    B.import-csv Accounts.csv Foreach {New-ADUser -Name $_.Name -Enabled $true -AccountPassword convertTo-SecureString $_.Password -AsPlainText -force)}
    C.import-csv Accounts.csv foreach {New-ADUser -Name $_.Name -Enabled $true -AccountPassword Read-Host -AsSecureString "Password")}
    D.import-csv Accounts.csv Foreach {New-ADUser -Name $_.Name -Enabled $true -AccountPassword (Read-Host -AsSecureString $_.Password)}

点击查看答案

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题