< Back
Get-GoogleOAuth2Profile
Post
NAME Get-GoogleOAuth2Profile
SYNOPSIS
Retrieves details about a cached profile or lists all available profiles.
SYNTAX
Get-GoogleOAuth2Profile [[-ClientId] <String>] [[-ProfileLocation] <String>] [<CommonParameters>]
DESCRIPTION
This cmdlet gets the tokens associated with a specific profile or lists all available profiles. Because the token
data is encrypted
using the Windows DPAPI, only token data that was stored by the current user can be successfully decrypted.
If a specified ClientId is not found in the cache, persisted credentials are synced from disk into the cache and
then it is checked again.
If a ClientId is not specified, the cache is synced from disk and then all Ids found in the cache are returned.
This cmdlet will only throw an exception if a ClientId is specified and not found and -ErrorAction is set to Stop,
otherwise, the cmdlet
will return null.
PARAMETERS
-ClientId <String>
The Id of the stored profile to retrieve. If this is not specified, a list of cached profiles is returned.
Required? false
Position? 1
Default value
Accept pipeline input? true (ByValue)
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
<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
System.Collections.Hashtable or System.String[]
NOTES
AUTHOR: Michael Haken
LAST UPDATE: 1/17/2018
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$Profiles = Get-GoogleOAuth2Profile
Retrieves a list of profiles cached on the system
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$TokenData = Get-GoogleOAuth2Profile -ClientId $Id
Gets the unencrypted token data associated with the profile stored with Id $Id. If $Id is not found, $TokenData
will be $null.
RELATED LINKS
SYNOPSIS
Retrieves details about a cached profile or lists all available profiles.
SYNTAX
Get-GoogleOAuth2Profile [[-ClientId] <String>] [[-ProfileLocation] <String>] [<CommonParameters>]
DESCRIPTION
This cmdlet gets the tokens associated with a specific profile or lists all available profiles. Because the token
data is encrypted
using the Windows DPAPI, only token data that was stored by the current user can be successfully decrypted.
If a specified ClientId is not found in the cache, persisted credentials are synced from disk into the cache and
then it is checked again.
If a ClientId is not specified, the cache is synced from disk and then all Ids found in the cache are returned.
This cmdlet will only throw an exception if a ClientId is specified and not found and -ErrorAction is set to Stop,
otherwise, the cmdlet
will return null.
PARAMETERS
-ClientId <String>
The Id of the stored profile to retrieve. If this is not specified, a list of cached profiles is returned.
Required? false
Position? 1
Default value
Accept pipeline input? true (ByValue)
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
<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
System.Collections.Hashtable or System.String[]
NOTES
AUTHOR: Michael Haken
LAST UPDATE: 1/17/2018
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$Profiles = Get-GoogleOAuth2Profile
Retrieves a list of profiles cached on the system
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$TokenData = Get-GoogleOAuth2Profile -ClientId $Id
Gets the unencrypted token data associated with the profile stored with Id $Id. If $Id is not found, $TokenData
will be $null.
RELATED LINKS