Ensure you have the required module by running the script below.
Install-Module GoogleWorkspace -Scope CurrentUserConnect using API credentials. This allows PowerShell to communicate with Google Workspace.
Connect-GoogleWorkspace -ClientID "your-client-id" -ClientSecret "your-secret-key"Set a new password for a specific user. The script below updates the password for user@example.com.
Set-GoogleWorkspaceUserPassword -User "user@example.com" -NewPassword "NewSecurePassword!"Send an email notification about the password change to ensure users are informed about the change.
Send-MailMessage -To "user@example.com" -From "admin@yourdomain.com" -Subject "Password Reset" -Body "Your password has been reset. Please change it upon login."Use Google’s API with PowerShell to reset a Google Workspace user’s password.
Set-GoogleUserPassword -User user@domain.com -NewPassword "NewPass@123"Yes, you can force users to change passwords at the next login by modifying user settings in Google Admin Console.
Yes, you can bulk reset passwords for multiple users with Google API scripting.