< Back
Remove-GoogleDirectoryUser
Post
NAME Remove-GoogleDirectoryUser
SYNOPSIS
Deletes a GSuite user.
SYNTAX
Remove-GoogleDirectoryUser [-UserId] <String> -BearerToken <String> [-Force] [-WhatIf] [-Confirm]
[<CommonParameters>]
Remove-GoogleDirectoryUser [-UserId] <String> [-ProfileLocation <String>] [-Persist] [-Force] [-WhatIf] [-Confirm]
[<CommonParameters>]
DESCRIPTION
This cmdlet deletes a GSuite user. After the user is deleted, they will no longer be able to login in. A deleted
user account can be restored within 5 days of deletion.
PARAMETERS
-UserId <String>
The Id of the user to be deleted. The UserId can be the user's primary email address, the unique user id, or
one of the user's alias email addresses.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-BearerToken <String>
The bearer token to use to authenticate the request.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ProfileLocation <String>
The location where stored credentials are located. If this is not specified, the default location will be used.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Persist [<SwitchParameter>]
Indicates that the newly retrieved token(s) or refreshed token and associated client data like client secret
are persisted to disk.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Force [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
OUTPUTS
None
NOTES
AUTHOR: Michael Haken
LAST UPDATE: 2/12/2018
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Remove-GoogleDirectoryUser -UserId liz@example.com -ClientId $Id -Persist -Force
This deletes the user liz@example.com using stored client credentials and bypasses confirmation.
RELATED LINKS
SYNOPSIS
Deletes a GSuite user.
SYNTAX
Remove-GoogleDirectoryUser [-UserId] <String> -BearerToken <String> [-Force] [-WhatIf] [-Confirm]
[<CommonParameters>]
Remove-GoogleDirectoryUser [-UserId] <String> [-ProfileLocation <String>] [-Persist] [-Force] [-WhatIf] [-Confirm]
[<CommonParameters>]
DESCRIPTION
This cmdlet deletes a GSuite user. After the user is deleted, they will no longer be able to login in. A deleted
user account can be restored within 5 days of deletion.
PARAMETERS
-UserId <String>
The Id of the user to be deleted. The UserId can be the user's primary email address, the unique user id, or
one of the user's alias email addresses.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-BearerToken <String>
The bearer token to use to authenticate the request.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ProfileLocation <String>
The location where stored credentials are located. If this is not specified, the default location will be used.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Persist [<SwitchParameter>]
Indicates that the newly retrieved token(s) or refreshed token and associated client data like client secret
are persisted to disk.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Force [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
OUTPUTS
None
NOTES
AUTHOR: Michael Haken
LAST UPDATE: 2/12/2018
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Remove-GoogleDirectoryUser -UserId liz@example.com -ClientId $Id -Persist -Force
This deletes the user liz@example.com using stored client credentials and bypasses confirmation.
RELATED LINKS