다음을 통해 공유


New-AXUser

Important

This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

New-AXUser

Creates a new user in Microsoft Dynamics AX.

Syntax

Parameter Set: Default
New-AXUser -AccountType <String> -AXUserId <String> -UserDomain <String> -UserName <String> [-ClearTextPassword <String> ] [-Company <String> ] [-CreateInProvider] [-Disabled] [-PartitionKey <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. You can also specify the partition to create the user in.

Parameters

-AXUserId<String>

Specifies the UserID of the user to be added to Microsoft Dynamics AX. The UserID must be unique within Microsoft Dynamics AX, or an error is returned.

Aliases

none

Required?

true

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ClearTextPassword<String>

Sets a password for the user in clear text, rather than encrypted. This parameter is only valid 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>

Specifies the company to create the user in. By default, users are created in the default company.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CreateInProvider

Specifies that a user be created in a forms-based authentication provider, in addition to Microsoft Dynamics AX. All users created with a forms-based authentication provider will have full read access to the Enterprise Portal site. 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

Disables the user. By default, users are enabled when they are created.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PartitionKey<String>

Specifies the partition to create the user in. By default, users are created in the initial partition.

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. The Name parameter is specified in the Add-AXSharepointClaimsAuthenticationProvider cmdlet.

Aliases

none

Required?

true

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?

true

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 https://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: Create a user authenticated with forms-based authentication

This example creates the Microsoft Dynamics AX user Samantha Smith. In this example, an authentication provider named FMFMBAProvider has already been created by using other Windows PowerShell cmdlets. 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 3: Create a user authenticated with Windows Active Directory

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: Create a user from an Active Directory group

This example creates a Windows group user (also called an Active Directory user) in Microsoft Dynamics AX from the Active Directory 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

Get-AXUser

Get-AXPartitionInfo

Configure Enterprise Portal flexible authentication

Copyright Microsoft Corporation. All rights reserved.