【ActiveDirectry】Powershellでパスワードリセット

パスワードを指定する場合は、ConvertTo-SecureStringを使って、セキュリティ保護された文字列に変換する必要がある。
1 |
PS C:\Users\Administrator> Set-ADAccountPassword -Identity user1 -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "P@ssword" -Force) |