单项选择题
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 (ConvertHost-
B.import-csv Accounts.csv Foreach {New-ADUser -Name $_.Name -Enabled $true - AccountPassword (ConvertTo-
C.import-csv Accounts.csv Foreach {New-ADUser -Name $_.Name -Enabled $true - AccountPassword (Read-To
D.import-csv Accounts.csv Foreach {New-ADUser -Name $_.Name -Enabled $true - AccountPassword (Read-Host
相关考题
-
单项选择题
Your network contains an Active Directory forest. The forest schema contains a custom attribute for user objects. You need to give the human resources department a file that contains the last logon time and the custom attribute values for each user in the forest. Which should you use()
A.the Dsquery tool
B.the Export-CSV cmdlet
C.the Get-ADUser cmdlet
D.the Net.exe user command -
单项选择题
Your network contains an Active Directory forest. The forest schema contains a custom attribute for user objects. You need to modify the custom attribute value of 500 user accounts. Which tool should you use()
A.Csvde
B.Dsmod
C.Dsrm
D.Ldifde -
单项选择题
Your network contains an Active Directory forest. You set the Windows PowerShell execution policy to allow unsigned scripts on a domain controller in the network. You create a Windows PowerShell script named new-users.ps1 that contains the following lines: new-aduser user1 new-aduser user2 new-aduser user3 new-aduser user4 new-aduser user5 On the domain controller, you double-click the script and the script runs. You discover that the script fails to create the user accounts. You need to ensure that the script creates the user accounts. Which cmdlet should you add to the script()
A.Import-Module
B.Register-ObjectEvent
C.Set-ADDomain
D.Set-ADUser
