Share via


Set-NAVServerUser

Changes the configuration settings of an existing Microsoft Dynamics NAV user.

Syntax

WindowsAccount (Default)

Set-NAVServerUser
    [-ServerInstance] <String>
    -WindowsAccount <String>
    [-Tenant <TenantId>]
    [-NewWindowsAccount <String>]
    [-NewUserName <String>]
    [-FullName <String>]
    [-State <NavUserState>]
    [-ExpiryDate <DateTime>]
    [-LicenseType <LicenseType>]
    [-AuthenticationKey <String>]
    [-ContactEmail <String>]
    [-AuthenticationEmail <String>]
    [-CreateWebServicesKey]
    [-WebServicesKeyExpiryDate <DateTime>]
    [-ProfileId <String>]
    [-AuthenticationObjectId <String>]
    [-Company <String>]
    [-LanguageId <String>]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Sid

Set-NAVServerUser
    [-ServerInstance] <String>
    -Sid <String>
    [-Tenant <TenantId>]
    [-NewWindowsAccount <String>]
    [-NewUserName <String>]
    [-FullName <String>]
    [-State <NavUserState>]
    [-ExpiryDate <DateTime>]
    [-LicenseType <LicenseType>]
    [-AuthenticationKey <String>]
    [-ContactEmail <String>]
    [-AuthenticationEmail <String>]
    [-CreateWebServicesKey]
    [-WebServicesKeyExpiryDate <DateTime>]
    [-ProfileId <String>]
    [-AuthenticationObjectId <String>]
    [-Company <String>]
    [-LanguageId <String>]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SidPass

Set-NAVServerUser
    [-ServerInstance] <String>
    -Sid <String>
    -Password <SecureString>
    [-Tenant <TenantId>]
    [-NewWindowsAccount <String>]
    [-NewUserName <String>]
    [-FullName <String>]
    [-State <NavUserState>]
    [-ExpiryDate <DateTime>]
    [-ChangePasswordAtNextLogOn]
    [-LicenseType <LicenseType>]
    [-AuthenticationKey <String>]
    [-ContactEmail <String>]
    [-AuthenticationEmail <String>]
    [-CreateWebServicesKey]
    [-WebServicesKeyExpiryDate <DateTime>]
    [-ProfileId <String>]
    [-AuthenticationObjectId <String>]
    [-Company <String>]
    [-LanguageId <String>]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

WindowsAccountPass

Set-NAVServerUser
    [-ServerInstance] <String>
    -WindowsAccount <String>
    -Password <SecureString>
    [-Tenant <TenantId>]
    [-NewWindowsAccount <String>]
    [-NewUserName <String>]
    [-FullName <String>]
    [-State <NavUserState>]
    [-ExpiryDate <DateTime>]
    [-ChangePasswordAtNextLogOn]
    [-LicenseType <LicenseType>]
    [-AuthenticationKey <String>]
    [-ContactEmail <String>]
    [-AuthenticationEmail <String>]
    [-CreateWebServicesKey]
    [-WebServicesKeyExpiryDate <DateTime>]
    [-ProfileId <String>]
    [-AuthenticationObjectId <String>]
    [-Company <String>]
    [-LanguageId <String>]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

UserName

Set-NAVServerUser
    [-ServerInstance] <String>
    -UserName <String>
    [-Tenant <TenantId>]
    [-NewWindowsAccount <String>]
    [-NewUserName <String>]
    [-FullName <String>]
    [-State <NavUserState>]
    [-ExpiryDate <DateTime>]
    [-LicenseType <LicenseType>]
    [-AuthenticationKey <String>]
    [-ContactEmail <String>]
    [-AuthenticationEmail <String>]
    [-CreateWebServicesKey]
    [-WebServicesKeyExpiryDate <DateTime>]
    [-ProfileId <String>]
    [-AuthenticationObjectId <String>]
    [-Company <String>]
    [-LanguageId <String>]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

UserNamePass

Set-NAVServerUser
    [-ServerInstance] <String>
    -UserName <String>
    -Password <SecureString>
    [-Tenant <TenantId>]
    [-NewWindowsAccount <String>]
    [-NewUserName <String>]
    [-FullName <String>]
    [-State <NavUserState>]
    [-ExpiryDate <DateTime>]
    [-ChangePasswordAtNextLogOn]
    [-LicenseType <LicenseType>]
    [-AuthenticationKey <String>]
    [-ContactEmail <String>]
    [-AuthenticationEmail <String>]
    [-CreateWebServicesKey]
    [-WebServicesKeyExpiryDate <DateTime>]
    [-ProfileId <String>]
    [-AuthenticationObjectId <String>]
    [-Company <String>]
    [-LanguageId <String>]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

AppId

Set-NAVServerUser
    [-ServerInstance] <String>
    -UserName <String>
    -ApplicationId <Guid>
    [-Tenant <TenantId>]
    [-NewWindowsAccount <String>]
    [-NewUserName <String>]
    [-FullName <String>]
    [-State <NavUserState>]
    [-ExpiryDate <DateTime>]
    [-AuthenticationKey <String>]
    [-ContactEmail <String>]
    [-Company <String>]
    [-LanguageId <String>]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Use the Set-NAVServerUser cmdlet to rename an existing Microsoft Dynamics NAV user or change other configuration parameters that are related to the user.

Examples

EXAMPLE 1

Set-NAVServerUser DynamicsNAV90 -Sid S-1-5-20 -NewWindowsAccount MyDomain\User1

This example renames the Windows account user name of a Microsoft Dynamics NAV user. The existing Microsoft Dynamics NAV user is identified by its Sid.

EXAMPLE 2

Set-NAVServerUser DynamicsNAV -WindowsAccount MyDomain\User1 -NewWindowsAccount MyDomain\User2

This example changes the Windows user name that is assigned to Microsoft Dynamics NAV user. The existing Microsoft Dynamics NAV user is identified by its current Windows user name by the WindowsAccount parameter.

EXAMPLE 3

Set-NAVServerUser DynamicsNAV90 -UserName USER1 -NewUserName USER2 -ChangePasswordAtNextLogOn -Password (Read-Host "Enter password for USER2" -AsSecureString)

This example changes the user name of a Microsoft Dynamics NAV user from USER1 to USER2. It also changes the user's password and requires that the user change the password the next time he logs on to Microsoft Dynamics NAV.

Parameters

-ApplicationId

Identifies the application this user represents. This requires that the application is registered in Azure Active Directory. The application is identified by its "client id" in Azure Active Directory.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AppId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AuthenticationEmail

Specifies the Microsoft account that this user uses to access Office 365 and SharePoint. The authentication email address must be the Microsoft account that the users log in to Office 365 with, such as an account from Microsoft Azure Active Directory (Azure AAD).

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

WindowsAccount
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Sid
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SidPass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WindowsAccountPass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UserName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UserNamePass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AuthenticationKey

Specifies the authentication key for authenticating with Microsoft Azure Access Control Service (ACS).

This key must be at least 8 characters and 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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AuthenticationObjectId

Specifies the Microsoft account that this user uses to access Office 365 and SharePoint. The authentication object id must be the Microsoft account that the users log in to Office 365 with, such as an account from Microsoft Azure Active Directory (Azure AAD).

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

WindowsAccount
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Sid
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SidPass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WindowsAccountPass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UserName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UserNamePass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ChangePasswordAtNextLogOn

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SidPass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WindowsAccountPass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UserNamePass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Company

{{Fill Company Description}}

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before executing the command.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ContactEmail

Specifies the contact email address for the Microsoft Dynamics NAV user.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

WindowsAccount
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Sid
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SidPass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WindowsAccountPass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UserName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UserNamePass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExpiryDate

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

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FullName

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LanguageId

{{Fill LanguageId Description}}

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LicenseType

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)

Parameter properties

Type:LicenseType
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

WindowsAccount
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Sid
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SidPass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WindowsAccountPass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UserName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UserNamePass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NewUserName

Specifies the new user name to assign the Microsoft Dynamics NAV user. The user name is defined by the User Name field in the user's account in Microsoft Dynamics NAV.

You cannot use the NewUserName parameter and NewWindowsAccount parameter in the same command.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NewWindowsAccount

Specifies the new Windows user name for the Microsoft Dynamics NAV user that you want to change. The value has the domain\username format.

You cannot use the NewWindowsAccount parameter and NewUserName parameter in the same command.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Password

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.

Parameter properties

Type:SecureString
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SidPass
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WindowsAccountPass
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UserNamePass
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProfileId

Specifies the ID of a profile to assign the user.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

WindowsAccount
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Sid
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SidPass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WindowsAccountPass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UserName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UserNamePass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServerInstance

Specifies the name of a Dynamics NAV Server instance, for example, DynamicsNAV or myinstance. You can specify either the full name of an instance, such as MicrosoftDynamicsNavServer$myinstance or the short name such as myinstance.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Sid

Specifies the security identifier (SID) of the Microsoft Dynamics NAV user that you want to change. 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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Sid
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SidPass
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-State

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

Enabled (0)

Disabled (1)

Parameter properties

Type:NavUserState
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Tenant

Specifies the ID of the tenant of the Microsoft Dynamics NAV Server instance that the user is stored in.

You can omit the Tenant parameter only if the Microsoft Dynamics NAV Server instance is not configured to run multiple tenants.

Parameter properties

Type:TenantId
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Id

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-UserName

Specifies the user name of the existing Microsoft Dynamics NAV user that you want to change. 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 Windows Account or Sid parameters.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

UserName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UserNamePass
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
AppId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WebServicesKeyExpiryDate

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

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

WindowsAccount
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Sid
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SidPass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WindowsAccountPass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UserName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UserNamePass
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WindowsAccount

Specifies the Windows account user name of the existing Microsoft Dynamics NAV user that you want to change. The value has the domain\username format. You can use 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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

WindowsAccount
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WindowsAccountPass
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

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

Inputs

System.String

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

Outputs

None