Skip to content
Spencer Varney edited this page Dec 27, 2016 · 3 revisions

Get-GAUser

SYNOPSIS

retrieve user

SYNTAX

OneUser (Default)

Get-GAUser [-UserKey] <String> [[-CustomFieldMask] <String>] [[-Projection] <ProjectionEnum>]
 [[-View] <ViewTypeEnum>] [-StandardQueryParams <StandardQueryParameters>] [-GAuthId <String>] [-WhatIf]
 [-Confirm]

AllUsers

Get-GAUser [-All] [[-CustomFieldMask] <String>] [[-ProjectionType] <ProjectionEnum>]
 [[-ViewType] <ViewTypeEnum>] [[-Customer] <String>] [[-Domain] <String>] [[-MaxResults] <Int32>]
 [[-OrderBy] <OrderByEnum>] [[-Query] <String>] [[-ShowDeleted] <String>] [[-SortOrder] <SortOrderEnum>]
 [-StandardQueryParams <StandardQueryParameters>] [-GAuthId <String>] [-WhatIf] [-Confirm]

DESCRIPTION

retrieve user

EXAMPLES

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

PS C:\> Get-GAUser -UserKey $SomeUserKeyString

This automatically generated example serves to show the bare minimum required to call this Cmdlet.

Additional examples may be added, viewed and edited by users on the community wiki at the URL found in the related links.

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

PS C:\> Get-GAUser -All

This automatically generated example serves to show the bare minimum required to call this Cmdlet.

Additional examples may be added, viewed and edited by users on the community wiki at the URL found in the related links.

PARAMETERS

-UserKey

Email or immutable Id of the user

Type: String
Parameter Sets: OneUser
Aliases: 

Required: True
Position: 0
Default value: 
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-All

A switch to list all results.

Type: SwitchParameter
Parameter Sets: AllUsers
Aliases: 

Required: False
Position: 1
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-CustomFieldMask

Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 2
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Projection

What subset of fields to fetch for this user.

Possible values: Basic, Custom, Full

Type: ProjectionEnum
Parameter Sets: OneUser
Aliases: 
Accepted values: Basic, Custom, Full

Required: False
Position: 3
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProjectionType

Possible values: Basic, Custom, Full

Type: ProjectionEnum
Parameter Sets: AllUsers
Aliases: 
Accepted values: Basic, Custom, Full

Required: False
Position: 3
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-View

Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.

Possible values: AdminView, DomainPublic

Type: ViewTypeEnum
Parameter Sets: OneUser
Aliases: 
Accepted values: AdminView, DomainPublic

Required: False
Position: 4
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ViewType

Possible values: AdminView, DomainPublic

Type: ViewTypeEnum
Parameter Sets: AllUsers
Aliases: 
Accepted values: AdminView, DomainPublic

Required: False
Position: 4
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Customer

Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.

Type: String
Parameter Sets: AllUsers
Aliases: 

Required: False
Position: 5
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Domain

Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead.

Type: String
Parameter Sets: AllUsers
Aliases: 

Required: False
Position: 6
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxResults

Maximum number of results to return. Default is 100. Max allowed is 500

Type: Int32
Parameter Sets: AllUsers
Aliases: 

Required: False
Position: 8
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OrderBy

Column to use for sorting results

Possible values: Email, FamilyName, GivenName

Type: OrderByEnum
Parameter Sets: AllUsers
Aliases: 
Accepted values: Email, FamilyName, GivenName

Required: False
Position: 9
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Query

Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users

Type: String
Parameter Sets: AllUsers
Aliases: 

Required: False
Position: 10
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ShowDeleted

If set to true retrieves the list of deleted users. Default is false

Type: String
Parameter Sets: AllUsers
Aliases: 

Required: False
Position: 11
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SortOrder

Whether to return results in ascending or descending order.

Possible values: ASCENDING, DESCENDING

Type: SortOrderEnum
Parameter Sets: AllUsers
Aliases: 
Accepted values: ASCENDING, DESCENDING

Required: False
Position: 12
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StandardQueryParams

A Standard Query Parameters Object.

Type: StandardQueryParameters
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-GAuthId

The GAuthId representing the gShell auth credentials this cmdlet should use to run.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

INPUTS

System.String

Email or immutable Id of the user

System.String

Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.

Google.Apis.admin.Directory.directory_v1.UsersResource+GetRequest+ProjectionEnum

What subset of fields to fetch for this user.

Google.Apis.admin.Directory.directory_v1.UsersResource+ListRequest+ProjectionEnum

Google.Apis.admin.Directory.directory_v1.UsersResource+GetRequest+ViewTypeEnum

Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.

Google.Apis.admin.Directory.directory_v1.UsersResource+ListRequest+ViewTypeEnum

System.String

Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.

System.String

Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead.

System.Int32

Maximum number of results to return. Default is 100. Max allowed is 500

Google.Apis.admin.Directory.directory_v1.UsersResource+ListRequest+OrderByEnum

Column to use for sorting results

System.String

Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users

System.String

If set to true retrieves the list of deleted users. Default is false

Google.Apis.admin.Directory.directory_v1.UsersResource+ListRequest+SortOrderEnum

Whether to return results in ascending or descending order.

OUTPUTS

NOTES

Part of the gShell Project, relating to the Google Directory API; see Related Links or use the -Online parameter.

RELATED LINKS

[Wiki page for this Cmdlet]

[Getting started with gShell]

Clone this wiki locally