Which cmdlet should you add to the script?

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?

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



Leave a Reply 0

Your email address will not be published. Required fields are marked *