New-AXUser

New-AXUser

Creates a new user in Microsoft Dynamics AX.

Syntax

Parameter Set: Default
New-AXUser [-AccountType <String> ] [-AXUserId <String> ] [-ClearTextPassword <String> ] [-Company <String> ] [-CreateInProvider] [-Disabled] [-UserDomain <String> ] [-UserName <String> ] [ <CommonParameters>]

Detailed description

The New-AXUser cmdlet creates a new user in Microsoft Dynamics AX. You can specify the type of user to add. If you are creating a claims user, specify the name of the claims provider in the UserDomain parameter. If you are using forms-based claims authentication, you can also create a new user in the provider.

Parameters

-AXUserId<String>

Specifies the UserID of the user to be added to Microsoft Dynamics AX.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-AccountType<String>

Specifies the type of user to add to Microsoft Dynamics AX. Valid values include: ClaimsUser, WindowsUser, and WindowsGroup user.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ClearTextPassword<String>

Sends a password in clear text, rather than encrypted. This parameter is required when creating a user in a forms-based-authentication provider. The user should be encouraged to change the password as soon as possible.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Company<String>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CreateInProvider

Specifies that the user will be created in a forms-based authentication provider. If you use this parameter, you must also use the -UserDomain parameter to specify the provider to create the user in. You must also use the -ClearTextPassword parameter to provide a password for the user. The user should be encouraged to change the password as soon as possible.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Disabled

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UserDomain<String>

Specifies the domain for the user. When you specify a ClaimsUser, specify the name of the claims provider in the UserDomain parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UserName<String>

Specifies the UserName of the user to be added to Microsoft Dynamics AX.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, OutBuffer, OutVariable, WarningAction, and WarningVariable. For more information, see about_CommonParameters http://go.microsoft.com/fwlink/?LinkID=113216

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

    You cannot pipe input to this cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • None

    The cmdlet does not generate any output.

Notes

  • You cannot specify the company of the user that is created--all users are created in the default company. All users are enabled when they are created.

Examples

Example 1

This example creates the Microsoft Dynamics AX user Samantha Smith. The user is authenticated with the FMFBAProvider forms-based authentication provider.

C:\PS>New-AXUser -AccountType ClaimsUser -AXUserId ssmith -UserName SamanthaSmith -UserDomain FMFBAProvider -CreateInProvider -ClearTextPassword "Yukon!!90"
AccountType : ClaimsUser
AXUserId : ssmith
Name : FMFBAProvider\SamanthaSmith
SID : S-1-5-21-2127521184-1604012920-1887927527-1530910
Enabled : Enabled
UserName : SamanthaSmith
UserDomain : FMFBAProvider
Company : DAT

Example 2

This example creates the Microsoft Dynamics AX user Rebecca Laszlo. The user is authenticated with the FMLiveIDProvider claims-based authentication provider.

C:\PS>New-AXUser -AccountType ClaimsUser -AXUserId rebecca -UserName rebeccalaszlo@live-int.com -UserDomain FMLiveIDProvider
						

AccountType : ClaimsUser
AXUserId : rebecca
Name : FMLiveIDProvider\rebeccalaszlo@live-int.com
SID : S-1-5-21-2127521184-1604012920-1887927527-1530910
Enabled : Enabled
UserName : rebeccalaszlo@live-int.com
UserDomain : FMLiveIDProvider
Company : DAT

Example 3

This example creates the Microsoft Dynamics AX user Ray Chow. The user is authenticated by Windows Active Directory.

C:\PS>New-AXUser -AccountType WindowsUser -AXUserId rchow -UserName RayChow -UserDomain CONTOSO
						

AccountType : WindowsUser
AXUserId : rchow
Name : CONTOSO\RayChow
SID : S-1-5-21-2127521184-1604012920-1887927527-1530910
Enabled : Enabled
UserName : RayChow
UserDomain : CONTOSO
Company : DAT

Example 4

This example creates the Microsoft Dynamics AX user daxtwo from the Windows Group daxtwo.

C:\PS>New-AXUser -AccountType WindowsGroup -AXUserId daxtwo -UserName daxtwo -UserDomain CONTOSO
						

AccountType : WindowsGroup
AXUserId : daxtwo
Name : Redmond\daxtwo
SID : S-1-5-21-2127521184-1604012920-1887927527-5384279
Enabled : Enabled
UserName : daxtwo
UserDomain : CONTOSO
Company : DAT

Flexible Authentication in Microsoft Dynamics AX 2012

Copyright Microsoft Corporation. All rights reserved.