Set-NAVServerUser
Set-NAVServerUser
Changes the configuration settings of an existing Microsoft Dynamics NAV user.
Syntax
Parameter Set: __AllParameterSets
Set-NAVServerUser [-ServerInstance] <String> [-AuthenticationEmail <String> ] [-AuthenticationKey <String> ] [-CreateWebServicesKey] [-ExpiryDate <DateTime> ] [-Force] [-FullName <String> ] [-LicenseType <LicenseType> ] [-NewUserName <String> ] [-NewWindowsAccount <String> ] [-ProfileId <String> ] [-State <NavUserState> ] [-Tenant <TenantId> ] [-WebServicesKeyExpiryDate <DateTime> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: Sid
Set-NAVServerUser -Sid <String> [-AuthenticationEmail <String> ] [-AuthenticationKey <String> ] [-CreateWebServicesKey] [-ExpiryDate <DateTime> ] [-Force] [-FullName <String> ] [-LicenseType <LicenseType> ] [-NewUserName <String> ] [-NewWindowsAccount <String> ] [-ProfileId <String> ] [-State <NavUserState> ] [-WebServicesKeyExpiryDate <DateTime> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SidPass
Set-NAVServerUser -Password <SecureString> -Sid <String> [-AuthenticationEmail <String> ] [-AuthenticationKey <String> ] [-ChangePasswordAtNextLogOn] [-CreateWebServicesKey] [-ExpiryDate <DateTime> ] [-Force] [-FullName <String> ] [-LicenseType <LicenseType> ] [-NewUserName <String> ] [-NewWindowsAccount <String> ] [-ProfileId <String> ] [-State <NavUserState> ] [-WebServicesKeyExpiryDate <DateTime> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: UserName
Set-NAVServerUser -UserName <String> [-AuthenticationEmail <String> ] [-AuthenticationKey <String> ] [-CreateWebServicesKey] [-ExpiryDate <DateTime> ] [-Force] [-FullName <String> ] [-LicenseType <LicenseType> ] [-NewUserName <String> ] [-NewWindowsAccount <String> ] [-ProfileId <String> ] [-State <NavUserState> ] [-WebServicesKeyExpiryDate <DateTime> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: UserNamePass
Set-NAVServerUser -Password <SecureString> -UserName <String> [-AuthenticationEmail <String> ] [-AuthenticationKey <String> ] [-ChangePasswordAtNextLogOn] [-CreateWebServicesKey] [-ExpiryDate <DateTime> ] [-Force] [-FullName <String> ] [-LicenseType <LicenseType> ] [-NewUserName <String> ] [-NewWindowsAccount <String> ] [-ProfileId <String> ] [-State <NavUserState> ] [-WebServicesKeyExpiryDate <DateTime> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: WindowsAccount
Set-NAVServerUser -WindowsAccount <String> [-AuthenticationEmail <String> ] [-AuthenticationKey <String> ] [-CreateWebServicesKey] [-ExpiryDate <DateTime> ] [-Force] [-FullName <String> ] [-LicenseType <LicenseType> ] [-NewUserName <String> ] [-NewWindowsAccount <String> ] [-ProfileId <String> ] [-State <NavUserState> ] [-WebServicesKeyExpiryDate <DateTime> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: WindowsAccountPass
Set-NAVServerUser -Password <SecureString> -WindowsAccount <String> [-AuthenticationEmail <String> ] [-AuthenticationKey <String> ] [-ChangePasswordAtNextLogOn] [-CreateWebServicesKey] [-ExpiryDate <DateTime> ] [-Force] [-FullName <String> ] [-LicenseType <LicenseType> ] [-NewUserName <String> ] [-NewWindowsAccount <String> ] [-ProfileId <String> ] [-State <NavUserState> ] [-WebServicesKeyExpiryDate <DateTime> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed 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.
Parameters
-AuthenticationEmail<String>
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 Windows Azure Active Directory (AAD).
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-AuthenticationKey<String>
Specifies the authentication key for authenticating with Windows 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.
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 |
-Force
Forces the command to run without asking for user confirmation.
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<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)
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-NewUserName<String>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-NewWindowsAccount<String>
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.
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? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ProfileId<String>
Specifies the ID of a profile to assign the user.
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 DynamicsNAV71. 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 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.
Aliases |
none |
Required? |
true |
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 parameters 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 |
-Tenant<TenantId>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-UserName<String>
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.
Aliases |
none |
Required? |
true |
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 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.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
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 renames the Windows account user name of a Microsoft Dynamics NAV user. The existing Microsoft Dynamics NAV user is identified by its Sid.
C:\PS>Set-NAVServerUser DynamicsNAV71 -Sid S-1-5-20 -NewWindowsAccount MyDomain\User1
-------------------------- EXAMPLE 2 --------------------------
Description
-----------
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.
C:\PS>Set-NAVServerUser DynamicsNAV71 –WindowsAccount MyDomain\User1 -NewWindowsAccount MyDomain\User2
-------------------------- EXAMPLE 3 --------------------------
Description
-----------
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.
C:\PS>Set-NAVServerUser DynamicsNAV71 -UserName USER1 -NewUserName USER2 -ChangePasswordAtNextLogOn -Password (Read-Host "Enter password for USER2" -AsSecureString)Enter password for USER2: ************