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

New-GAUser

SYNOPSIS

create user.

SYNTAX

PasswordGenerated (Default)

New-GAUser [-UserName] <String> [-GivenName] <String> [-FamilyName] <String> [[-PasswordLength] <Int32>]
 [-ShowNewPassword] [[-IncludeInDirectory] <Boolean>] [[-Suspended] <Boolean>] [[-IpWhiteListed] <Boolean>]
 [[-ChangePasswordAtNextLogin] <Boolean>] [[-OrgUnitPath] <String>]
 [-StandardQueryParams <StandardQueryParameters>] [-GAuthId <String>] [-WhatIf] [-Confirm]

PasswordProvided

New-GAUser [-UserName] <String> [-GivenName] <String> [-FamilyName] <String> [[-Password] <String>]
 [[-IncludeInDirectory] <Boolean>] [[-Suspended] <Boolean>] [[-IpWhiteListed] <Boolean>]
 [[-ChangePasswordAtNextLogin] <Boolean>] [[-OrgUnitPath] <String>]
 [-StandardQueryParams <StandardQueryParameters>] [-GAuthId <String>] [-WhatIf] [-Confirm]

SecureString

New-GAUser [-UserName] <String> [-GivenName] <String> [-FamilyName] <String>
 [[-SecureStringPassword] <SecureString>] [[-IncludeInDirectory] <Boolean>] [[-Suspended] <Boolean>]
 [[-IpWhiteListed] <Boolean>] [[-ChangePasswordAtNextLogin] <Boolean>] [[-OrgUnitPath] <String>]
 [-StandardQueryParams <StandardQueryParameters>] [-GAuthId <String>] [-WhatIf] [-Confirm]

Body

New-GAUser [-UserName] <String> [[-UserBody] <User>] [-StandardQueryParams <StandardQueryParameters>]
 [-GAuthId <String>] [-WhatIf] [-Confirm]

DESCRIPTION

create user.

EXAMPLES

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

PS C:\> New-GAUser -UserBody $SomeUserObj

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

-UserName

User's name

Type: String
Parameter Sets: (All)
Aliases: 

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

-GivenName

First Name

Type: String
Parameter Sets: PasswordGenerated, PasswordProvided, SecureString
Aliases: 

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

-FamilyName

Last Name

Type: String
Parameter Sets: PasswordGenerated, PasswordProvided, SecureString
Aliases: 

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

-Password

User's password

Type: String
Parameter Sets: PasswordProvided
Aliases: 

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

-SecureStringPassword

A secure string password.

Type: SecureString
Parameter Sets: SecureString
Aliases: 

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

-PasswordLength

The desired length of the generated password

Type: Int32
Parameter Sets: PasswordGenerated
Aliases: 

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

-ShowNewPassword

Indicates if the generated password should be shown

Type: SwitchParameter
Parameter Sets: PasswordGenerated
Aliases: 

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

-IncludeInDirectory

Boolean indicating if user is included in Global Address List

Type: Boolean
Parameter Sets: PasswordGenerated, PasswordProvided, SecureString
Aliases: 

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

-Suspended

Indicates if user is suspended

Type: Boolean
Parameter Sets: PasswordGenerated, PasswordProvided, SecureString
Aliases: 

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

-IpWhiteListed

Boolean indicating if ip is whitelisted

Type: Boolean
Parameter Sets: PasswordGenerated, PasswordProvided, SecureString
Aliases: 

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

-ChangePasswordAtNextLogin

Boolean indicating if the user should change password in next login

Type: Boolean
Parameter Sets: PasswordGenerated, PasswordProvided, SecureString
Aliases: 

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

-OrgUnitPath

OrgUnit of User

Type: String
Parameter Sets: PasswordGenerated, PasswordProvided, SecureString
Aliases: 

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

-UserBody

JSON template for User object in Directory API.

Type: User
Parameter Sets: Body
Aliases: 

Required: False
Position: 0
Default value: 
Accept pipeline input: True (ByPropertyName, ByValue)
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

User's name

System.Boolean

Boolean indicating if the user should change password in next login

Google.Apis.admin.Directory.directory_v1.Data.User

JSON template for User object in Directory API.

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