< Back

Remove-GoogleOAuth2Profile

Tue Jan 14, 2020 12:03 am

NAME Remove-GoogleOAuth2Profile



SYNOPSIS

Removes a cached and/or stored Google OAuth profile.





SYNTAX

Remove-GoogleOAuth2Profile [-ClientId] <String> [[-ProfileLocation] <String>] [-RevokeToken] [-Force] [-PassThru]

[-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

This cmdlet will delete the cached and stored profile for the specified client id. If RevokeToken is specified,

the set of tokens,

including the refresh token will be invalidated.





PARAMETERS

-ClientId <String>

The supplied client id for OAuth.



Required? true

Position? 1

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? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-RevokeToken [<SwitchParameter>]

This specifies that any tokens associated with this profile will be revoked permanently.



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



-PassThru [<SwitchParameter>]

If this is specified, the deleted profile data is returned to the pipeline.



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

None





OUTPUTS

None or System.Collections.Hashtable



The hashtable will contain either an access_token or refresh_token property or both.





NOTES





AUTHOR: Michael Haken

LAST UPDATE: 1/12/2018



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Remove-GoogleOAuth2Profile -ClientId $Id



Removes cached and persisted profile data for the id contained in the $Id variable. The user is prompted before

the removal occurs.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Remove-GoogleOAuth2Profile -ClientId $Id -RevokeToken -Force



Removes cached and persisted profile data for the id contained in the $Id variable and invalidates all associated

tokens that have been issued. The

-Force parameter bypasses any confirmation.











RELATED LINKS