diff --git a/wiki/GamUpdates.md b/wiki/GamUpdates.md index 478e044b..4d538f81 100644 --- a/wiki/GamUpdates.md +++ b/wiki/GamUpdates.md @@ -21,6 +21,19 @@ a literal string, a file or a Google Doc. (gdoc )| (gcsdoc )) ``` +Added command `gam check suspended ` that checks the suspension status of a user +and sets the return code to 0 if the user is not suspended or 26 if it is. +``` +$ gam check suspended testok@domain.com +User: testok@domain.com, Account Suspended: False +$ echo $? +0 + +$ gam check suspended testsusp@domain.com +User: testsusp@domain.com, Account Suspended: True, Suspension Reason: ADMIN +$ echo $? +26 +``` ### 7.11.00 diff --git a/wiki/Users.md b/wiki/Users.md index 04f3a324..8c2ea9f2 100644 --- a/wiki/Users.md +++ b/wiki/Users.md @@ -21,6 +21,7 @@ - [Update a user's attributes with JSON data](#update-a-users-attributes-with-json-data) - [Update a user's OU based on group membership](#update-a-users-ou-based-on-group-membership) - [Do not update a user's OU if currently in a special purpose OU](#do-not-update-a-users-ou-if-currently-in-a-special-purpose-ou) +- [Check a user's suspension status](#check-a-users-suspension-status) - [Delete or suspend users](#delete-or-suspend-users) - [Undelete or unsuspend users](#undelete-or-unsuspend-users) - [Display information about users](#display-information-about-users) @@ -896,6 +897,25 @@ gam csv SISdata.csv gam update user "~primaryEmail" suspended off firstname "~Fi ou "~OU" immutableous "'/Students/Lower School/Restricted,'/Students/Middle School/Restricted'" ``` +## Check a user's suspension status +This command checks the suspension status of a single user +and sets the return code to 0 if the user is not suspended or 26 if it is. +``` +gam check suspended +``` +Example. +``` +$ gam check suspended testok@domain.com +User: testok@domain.com, Account Suspended: False +$ echo $? +0 + +$ gam check suspended testsusp@domain.com +User: testsusp@domain.com, Account Suspended: True, Suspension Reason: ADMIN +$ echo $? +26 +``` + ## Delete or suspend users These commands operate on a single user. ```