Export (0) Print
Expand All

New-NAVServerUser

New-NAVServerUser

Creates a new Microsoft Dynamics NAV user.

Syntax

Parameter Set: __AllParameterSets
New-NAVServerUser [-ServerInstance] <String> [-AuthenticationKey <String> ] [-ChangePasswordAtNextLogOn] [-CreateWebServicesKey] [-ExpiryDate <DateTime> ] [-FullName <String> ] [-LicenseType <String> ] [-Password <SecureString> ] [-Sid <String> ] [-State <NavUserState> ] [-UserName <String> ] [-WebServicesKeyExpiryDate <DateTime> ] [-WindowsAccount <String> ] [ <CommonParameters>]




Detailed Description

Use the New-NAVServerUser cmdlet to create a new Microsoft Dynamics NAV user. Anonymous accounts such as S-1-1-0 (Everyone) and S-1-5-7 (Anonymous) are not allowed.

Parameters

-AuthenticationKey<String>

Specifies the authentication key for authenticating with Windows Azure Access Control Service (ACS). This key must be at least 8 characters and contain a combination of uppercase and lowercase letters and numbers.

The authentication key is entered by the user the first time that the user logs on to Microsoft Dynamics NAV.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ChangePasswordAtNextLogOn

Forces the user to change the password the next time that the user logs on.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CreateWebServicesKey

Creates a web services access key for the user. The web service access key is automatically generated.

This parameter is relevant only when Microsoft Dynamics NAV is configured to use either the NavUserPassword or AccessControlService credential type for authenticating users. The web service access key is used instead of a password to authenticate web service requests, such as SOAP and OData.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ExpiryDate<DateTime>

Specifies when the user's access to Microsoft Dynamics NAV expires.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FullName<String>

Sets the full name of the user.

On the User card in Microsoft Dynamics NAV, this value appears in the Full Name field. The value typically includes the user's first and last name.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LicenseType<String>

Specifies the license type to assign the user. The parameter has the following values (you can use either the text value or the integer in the parenthesis):

Full (0)

Limited (1)

DeviceOnly (2)

WindowsGroup (3) - Use this license type if the Microsoft Dynamics NAV user is based on a Windows group in Active Directory. This user account cannot log on to Microsoft Dynamics NAV. Instead, it is used to map the permission set to the individual Windows users in the Windows user group. You must apply the license type to the individual users in the Windows user group.

External (4)


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Password<SecureString>

Specifies a protected password for the Microsoft Dynamics NAV user.

The password is only used when the credential type for authenticating users who try to access Microsoft Dynamics NAV is set to NavUserPassword.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ServerInstance<String>

Specifies the name of a Microsoft Dynamics NAV Server instance. The default instance name is DynamicsNAV70. You can specify either the full name of an instance (such as MicrosoftDynamicsNavServer$myinstance) or the short name (such as myinstance).


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Sid<String>

Specifies the security identifier (SID) of the Windows user account for the user that you want to set up as a Microsoft Dynamics NAV user. The SID is a unique value that identifies a Windows user account.

You can use the Sid, UserName, or WindowsAccount parameters to create the user. If you use the Sid parameter, then you cannot set the UserName or WindowsAccount parameters.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-State<NavUserState>

Sets the current state of the user’s access to Microsoft Dynamics NAV. The parameter has the following values (you can use either the text value of the integer value in parenthesis:

Enabled (0)
Disabled (1)


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UserName<String>

Specifies the user name for the new Microsoft Dynamics NAV user. The user name appears in the User Name field in a user's account in Microsoft Dynamics NAV.

You can use the UserName, WindowsAccount, or Sid parameters to identify the user. If you use the Username parameter, then you cannot use the WindowsAccount or Sid parameters.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WebServicesKeyExpiryDate<DateTime>

Specifies the date and time when the user’s web services access key expires.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WindowsAccount<String>

Specifies the Windows account user name for the user that you want to set up as a Microsoft Dynamics NAV user. The value has the domain\username format.

You can use either the WindowsAccount, UserName, or Sid parameters to create the user. If you use the WindowsAccount parameter, then you cannot use the UserName or Sid parameters.


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, and -OutVariable. For more information, see about_CommonParameters.

Inputs

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

  • System.String

    You can pipe a string that contains a Microsoft Dynamics NAV Server instance name to the cmdlet.


Outputs

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

  • None

    This cmdlet does not generate any output.


Examples

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

Description

-----------

This example creates a new Microsoft Dynamics NAV user based on the built-in NT AUTHORITY\NETWORK SERVICE account of Windows.


C:\PS>New-NAVServerUser DynamicsNAV70 -Sid S-1-5-20

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

Description

-----------

This example creates a new Microsoft Dynamics NAV user based on a Windows user account that has the user name Chris from the domain Cronus.


C:\PS>New-NAVServerUser MicrosoftDynamicsNavServer -WindowsAccount Cronus\Chris

-------------------------- EXAMPLE 3 --------------------------

Description

-----------

This example creates a new Microsoft Dynamics NAV user that has the user name Chris and a password that is entered as a secure string (****).


C:\PS>New-NAVServerUser nav8 -UserName Chris -Password (Read-Host "Enter password for User1" -AsSecureString) -Verbose
Enter password for User1: ****
VERBOSE: NavCommand.BeginProcessing
VERBOSE: NavCommand.ProcessRecord
VERBOSE: Opening connection to ServerInstance 'MicrosoftDynamicsNavServer$nav8'
VERBOSE: Connection to ServerInstance 'MicrosoftDynamicsNavServer$nav8' has been opened
VERBOSE: Calling ServerInstance = MicrosoftDynamicsNavServer$nav8
VERBOSE: NavCommand.EndProcessing
VERBOSE: Closing connection to ServerInstance 'MicrosoftDynamicsNavServer$nav8'
VERBOSE: Connection to ServerInstance 'MicrosoftDynamicsNavServer$nav8' has been closed

-------------------------- EXAMPLE 4 --------------------------

Description

-----------

This example creates a new Microsoft Dynamics NAV user that has the user name Chris and password Password1234.


C:\PS>New-NAVServerUser nav8 -UserName Chris -Password (ConvertTo-SecureString 'Password1234' -AsPlainText -Force)

-------------------------- EXAMPLE 5 --------------------------

Description

-----------

This example creates a new Microsoft Dynamics NAV user that has the user name Chris and a web services access key for logging on to Microsoft Dynamics NAV. The web services access key expires on 01-01-2014.


C:\PS>New-NAVServerUser nav8 -CreateWebServicesKey -UserName Chris -WebServicesKeyExpiryDate '01-01-2014'

Show:
© 2015 Microsoft