mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-06-15 02:13:43 +00:00
Update PowerShell script to use azurepowershell-interactive
This commit is contained in:
@ -111,7 +111,7 @@ If your users are defined in Microsoft Entra ID and not synchronized from Active
|
||||
The following sample PowerShell script generates a random password of 64 characters and sets it for the user specified in the variable name $userId.
|
||||
Modify the **userId** variable of the script to match your environment (first line), and then run it in a PowerShell session. When prompted to authenticate to Microsoft Entra ID, use the credentials of an account with a role capable of resetting passwords.
|
||||
|
||||
```powershell
|
||||
```azurepowershell-interactive
|
||||
$userId = "<UPN of the user>"
|
||||
|
||||
function Generate-RandomPassword{
|
||||
|
Reference in New Issue
Block a user