You install an Active Directory domain in a test environment.
You need to reset the passwords of all the user accounts in the domain from a domain controller.
Which two Windows PowerShell commands should you run? (Each correct answer presents part of the solution, choose two.)
A.
$ newPassword = *
B.
Import-Module ActiveDirectory
C.
Import-Module WebAdministration
D.
Get- AdUser -filter * | Set- ADAccountPossword – NewPassword $ newPassword – Reset
E.
Set- ADAccountPossword – NewPassword – Reset
F.
$ newPassword = (Read-Host – Prompt “New Password” – AsSecureString )
G.
Import-Module ServerManager
This doesn’t look right. The Get-AdUser command is part of the ActiveDirectory module so you’d have to import that first. I’d go with B then D as my solution since F is just repeating some of the commands from D.
http://blogs.technet.com/b/heyscriptingguy/archive/2010/08/17/how-to-change-a-user-s-active-directory-password-with-powershell.aspx
The correct answer is B and E
http://blogs.technet.com/b/heyscriptingguy/archive/2010/08/17/how-to-change-a-user-s-active-directory-password-with-powershell.aspx
Sorry misktake it is D and F
I think it should be B and D and F because you must import activedirectory module first. Check the link that Baboo listed.
I agree with Ed. B will import the necessary PS module. F will prompt for a password and store it as a secure string. D will search active directory for all user accounts and then apply the password to each account.
Example 4 covers this questions:
http://technet.microsoft.com/en-us/library/ee617261.aspx