New-IDUser

New-IDUser

SYNOPSIS

Create a new user

SYNTAX

New-IDUser [-Name] <String> [-Mail] <String> [[-DisplayName] <String>] [[-Description] <String>]
 [[-Password] <SecureString>] [[-MobileNumber] <String>] [[-HomeNumber] <String>] [[-OfficeNumber] <String>]
 [[-OrgPath] <String>] [[-ReportsTo] <String>] [[-PrimaryIdentifier] <String>]
 [[-CmaRedirectedUserUuid] <String>] [-ServiceUser] [-InEverybodyRole] [-InSysAdminRole] [-SendEmailInvite]
 [-SendSmsInvite] [-VerifyEmail] [-ForcePasswordChangeNext] [-PasswordNeverExpire] [-useAlternateMfaAccount]
 [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Creates a new user in the tenant’s cloud directory.

CDirectoryService/CreateUser’s response IS the new user’s UUID as a plain string, not an object with a .Uuid/.ID property.

EXAMPLES

Example 1

PS C:\> New-IDUser -Name 'someuser' -Mail 'someuser@example.com'

Creates a new user with the specified name and email address.

Example 2

PS C:\> New-IDUser -Name 'someuser' -Mail 'someuser@example.com' -DisplayName 'Some User' -SendEmailInvite -ForcePasswordChangeNext

Creates a new user, sends them an email invite, and requires them to change their password on first login.

PARAMETERS

-CmaRedirectedUserUuid

The UUID of the user to redirect this account’s authentication to, if applicable.

Type: String
Parameter Sets: (All)
Aliases:

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

-Description

A description for the new user.

Type: String
Parameter Sets: (All)
Aliases:

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

-DisplayName

The display name for the new user.

Type: String
Parameter Sets: (All)
Aliases:

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

-ForcePasswordChangeNext

Requires the user to change their password on next login.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-HomeNumber

The user’s home phone number.

Type: String
Parameter Sets: (All)
Aliases:

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

-InEverybodyRole

Includes the user in the tenant’s “Everybody” role.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-InSysAdminRole

Includes the user in the tenant’s system administrator role.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Mail

The user’s email address.

Type: String
Parameter Sets: (All)
Aliases:

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

-MobileNumber

The user’s mobile phone number.

Type: String
Parameter Sets: (All)
Aliases:

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

-Name

The username for the new user.

Type: String
Parameter Sets: (All)
Aliases:

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

-OfficeNumber

The user’s office phone number.

Type: String
Parameter Sets: (All)
Aliases:

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

-OrgPath

The organizational path under which to create the user.

Type: String
Parameter Sets: (All)
Aliases:

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

-Password

The initial password for the new user.

Type: SecureString
Parameter Sets: (All)
Aliases:

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

-PasswordNeverExpire

Sets the user’s password to never expire.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-PrimaryIdentifier

The primary identifier to use for the new user.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 10
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReportsTo

The username of the user’s manager.

Type: String
Parameter Sets: (All)
Aliases:

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

-SendEmailInvite

Sends the new user an email invite.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-SendSmsInvite

Sends the new user an SMS invite.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-ServiceUser

Marks the new user as a service user.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-VerifyEmail

Requires the user to verify their email address.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-useAlternateMfaAccount

Allows the user to use an alternate account for MFA.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

System.Object

NOTES