Pricing  Get Quote
 
 

PowerShell Script to Reset User's Password in G Suite (Google Apps)

The PowerShell script provided here resets a user's password in G Suite. ADSelfService Plus, an Active Directory (AD) self-service password management, and single sign-on solution, offers the Password Reset feature that allows users to reset their AD passwords. It also offers the Password Synchronization feature that syncs users’ passwords and any changes to it with their user accounts in applications like G Suite. When both these features are configured, users can use the same password to log into G Suite and their AD domain, and can reset this password without help desk intervention. Here is a comparison between resetting user's G Suite passwords using PowerShell and ADSelfService Plus.

PowerShell

G Suite passwords can be reset using a set of PowerShell cmdlets called gShell. Run the following script to reset a user's G Suite password:
$scriptBlock = {
    Import-Module gShell

    $userID = "%mail%" # TODO: modify me
    $newPassword = "Password" # TODO: modify me

    Set-GAUser -UserKey $userID -NewPassword $newPassword
}

try
{
    Invoke-Command -ComputerName localhost -ScriptBlock $scriptBlock -ErrorAction Stop
}
catch
{
    $Context.LogMessage("An error occurred when reseting password for user. Error: " + $_.Exception.Message, "Warning")
}
 Copied
Click to copy entire script

ADSelfService Plus

ADSelfService Plus's Password Reset feature allows users to reset their G Suite passwords without any help-desk intervention. This reduces the workload of help desk administrators and improves the user's productivity.

Feature configuration is as simple as:

  • Creating an ADSelfService Plus policy,
  • Specifying the users for the policy.
  • Selecting Password Reset and other self-service actions for respective users.
The Password Synchronization feature synchronizes the changes made to a user's AD password with other integrated applications like G Suite, Office 365, Salesforce, and much more.

Configuration involves:

  • Selecting the application for which passwords are to be synced.
  • Selecting the right ADSelfService Plus policy whose users' passwords are to be synced.
When both these configurations are set to be true, users can reset their G Suite passwords, and it will be synced with their AD domain accounts automatically.

Screenshots:

how-to-reset-password-in-google-apps-using-powershell-1
how-to-reset-password-in-google-apps-using-powershell-2
Advantages of ADSelfService Plus:
  • Self-service password reset (SSPR):

    With ADSelfService Plus, users can reset their passwords from:

    • The logon screens of their Windows, Linux, or macOS machines.
    • Web browsers by accessing the ADSelfService Plus portal, which can be configured to be accessed through all major web browsers.
    • Their mobile devices by accessing the ADSelfService Plus iOS or Android mobile app or mobile site.
    • Their private networks, even remotely. Furthermore resetting their passwords, ADSelfService Plus also lets users update their cached credentials.
  • Choose who can reset their G Suite passwords:

    While creating the ADSelfService Plus policy, administrators can choose to allow only users belonging to specific domains, OUs and groups to reset G Suite passwords.

  • Secure password resets:

    ADSelfService Plus offers the Multi-factor Authentication that secures self-service actions like password resets performed by the user. When this feature is configured, users have to complete multiple levels of authentication using any of the 15 methods enabled by the administrator before proceeding to reset their password or perform any other self-service action. Also, administrators can specify the maximum number of password resets that can be performed by users in a specific number of days.

  • Synchronize password changes made through multiple mediums:

    ADSelfService Plus allows password resets made from the ADSelfService portal and mobile app, and the Windows, macOS and Linux login screens to be synchronized with the applications. Password changes in the Ctrl+Alt+Del console and password resets in the Active Directory Users and Computers portal could be synchronized as well.

  • Synchronize G Suite password with multiple applications:

    Using ADSelfService Plus, users' passwords can be synchronized between G Suite, AD and other on-premises and cloud applications like Office 365 and Salesforce.

  • Prevent creation of weak passwords:

    ADSelfService Plus' Password Policy Enforcer allows administrators to create and enforce custom password policies that inhibit the creation of weak passwords that are vulnerable to hacks.

Empower users to reset their G Suite passwords.

  Get 30-day free trial.
  • Embark on your script-free AD Self-service password management with ADSelfService Plus.
  •  
  • By clicking 'Start your free trial now', you agree to processing of personal data according to the Privacy Policy.
  • Thank you for downloading!

    Your download should begin automatically in 15 seconds. If not, click here to download manually.

    Thank you for downloading!

    Your download should begin automatically in 15 seconds. If not, click here to download manually.

Related Resources

ADSelfService Plus trusted by

A single pane of glass for complete self service password management
Email Download Link