mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-05-12 05:17:22 +00:00
fix
This commit is contained in:
parent
0df087627d
commit
1007a030d7
@ -123,7 +123,7 @@ function Generate-RandomPassword{
|
||||
|
||||
$NewPassword = ConvertTo-SecureString -String (Generate-RandomPassword) -AsPlainText -Force
|
||||
|
||||
Set-ADAccountPassword -identity $samAccountName = <sAMAccountName of the user> -NewPassword $NewPassword -Reset
|
||||
Set-ADAccountPassword -identity $samAccountName -NewPassword $NewPassword -Reset
|
||||
```
|
||||
|
||||
If your organizational policies allow it, you can configure the randomized passwords to never expire, or use a long expiration period. This configuration prevents the user from being prompted to change their password.
|
||||
|
Loading…
x
Reference in New Issue
Block a user