< Back
Get-GoogleDirectoryGroupsForUser
Post
NAME Get-GoogleDirectoryGroupsForUser
SYNOPSIS
Gets a list of GSuite groups assigned to a specified user.
SYNTAX
Get-GoogleDirectoryGroupsForUser [-UserId] <String> [-MaxResults <UInt32>] -BearerToken <String> [-UseCompression]
[<CommonParameters>]
Get-GoogleDirectoryGroupsForUser [-UserId] <String> [-MaxResults <UInt32>] [-ProfileLocation <String>] [-Persist]
[-UseCompression] [<CommonParameters>]
DESCRIPTION
This cmdlet retrieves details about GSuite groups assigned to a specified user.
PARAMETERS
-UserId <String>
The id of the member to retrieve groups for. A member can either be a user or a group. The userKey can be the
user's primary email address,
the user's alias email address, a group's primary email address, a group's email alias, or the user's unique
id.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-MaxResults <UInt32>
The maximum number of results returned in a single call. Specifying a non-zero value for this parameter will
page
the results so that multiple HTTP calls are made to retrieve all of the results.
Required? false
Position? named
Default value 0
Accept pipeline input? false
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
-UseCompression [<SwitchParameter>]
If specified, the returned data is compressed using gzip.
Required? false
Position? named
Default value False
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
System.Collections.Hashtable[]
NOTES
AUTHOR: Michael Haken
LAST UPDATE: 2/6/2018
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$Groups = Get-GoogleDirectoryGroupList -ClientId $Id -Persist -UseCompression
Gets a listing of all of the groups for the admin using the cmdlet. The results are returned using gzip to minimize
bandwidth utilization.
RELATED LINKS
SYNOPSIS
Gets a list of GSuite groups assigned to a specified user.
SYNTAX
Get-GoogleDirectoryGroupsForUser [-UserId] <String> [-MaxResults <UInt32>] -BearerToken <String> [-UseCompression]
[<CommonParameters>]
Get-GoogleDirectoryGroupsForUser [-UserId] <String> [-MaxResults <UInt32>] [-ProfileLocation <String>] [-Persist]
[-UseCompression] [<CommonParameters>]
DESCRIPTION
This cmdlet retrieves details about GSuite groups assigned to a specified user.
PARAMETERS
-UserId <String>
The id of the member to retrieve groups for. A member can either be a user or a group. The userKey can be the
user's primary email address,
the user's alias email address, a group's primary email address, a group's email alias, or the user's unique
id.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-MaxResults <UInt32>
The maximum number of results returned in a single call. Specifying a non-zero value for this parameter will
page
the results so that multiple HTTP calls are made to retrieve all of the results.
Required? false
Position? named
Default value 0
Accept pipeline input? false
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
-UseCompression [<SwitchParameter>]
If specified, the returned data is compressed using gzip.
Required? false
Position? named
Default value False
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
System.Collections.Hashtable[]
NOTES
AUTHOR: Michael Haken
LAST UPDATE: 2/6/2018
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$Groups = Get-GoogleDirectoryGroupList -ClientId $Id -Persist -UseCompression
Gets a listing of all of the groups for the admin using the cmdlet. The results are returned using gzip to minimize
bandwidth utilization.
RELATED LINKS