Set-NAVServerUser
Changes the configuration settings of an existing Business Central user.
Set-NAVServerUser
[-Tenant <TenantId>]
[-NewWindowsAccount <String>]
-WindowsAccount <String>
[-NewUserName <String>]
[-FullName <String>]
[-State <NavUserState>]
[-ExpiryDate <DateTime>]
[-LicenseType <LicenseType>]
[-AuthenticationKey <String>]
[-ContactEmail <String>]
[-AuthenticationEmail <String>]
[-CreateWebServicesKey]
[-WebServicesKeyExpiryDate <DateTime>]
[-ProfileId <String>]
[-ProfileAppId <Guid>]
[-AuthenticationObjectId <String>]
[-Company <String>]
[-LanguageId <String>]
[-ServerInstance] <String>
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-NAVServerUser
[-Tenant <TenantId>]
[-NewWindowsAccount <String>]
-Sid <String>
[-NewUserName <String>]
[-FullName <String>]
[-State <NavUserState>]
[-ExpiryDate <DateTime>]
[-LicenseType <LicenseType>]
[-AuthenticationKey <String>]
[-ContactEmail <String>]
[-AuthenticationEmail <String>]
[-CreateWebServicesKey]
[-WebServicesKeyExpiryDate <DateTime>]
[-ProfileId <String>]
[-ProfileAppId <Guid>]
[-AuthenticationObjectId <String>]
[-Company <String>]
[-LanguageId <String>]
[-ServerInstance] <String>
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-NAVServerUser
[-Tenant <TenantId>]
[-NewWindowsAccount <String>]
-Sid <String>
[-NewUserName <String>]
[-FullName <String>]
[-State <NavUserState>]
[-ExpiryDate <DateTime>]
[-ChangePasswordAtNextLogOn]
[-LicenseType <LicenseType>]
-Password <SecureString>
[-AuthenticationKey <String>]
[-ContactEmail <String>]
[-AuthenticationEmail <String>]
[-CreateWebServicesKey]
[-WebServicesKeyExpiryDate <DateTime>]
[-ProfileId <String>]
[-ProfileAppId <Guid>]
[-AuthenticationObjectId <String>]
[-Company <String>]
[-LanguageId <String>]
[-ServerInstance] <String>
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-NAVServerUser
[-Tenant <TenantId>]
[-NewWindowsAccount <String>]
-WindowsAccount <String>
[-NewUserName <String>]
[-FullName <String>]
[-State <NavUserState>]
[-ExpiryDate <DateTime>]
[-ChangePasswordAtNextLogOn]
[-LicenseType <LicenseType>]
-Password <SecureString>
[-AuthenticationKey <String>]
[-ContactEmail <String>]
[-AuthenticationEmail <String>]
[-CreateWebServicesKey]
[-WebServicesKeyExpiryDate <DateTime>]
[-ProfileId <String>]
[-ProfileAppId <Guid>]
[-AuthenticationObjectId <String>]
[-Company <String>]
[-LanguageId <String>]
[-ServerInstance] <String>
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-NAVServerUser
[-Tenant <TenantId>]
[-NewWindowsAccount <String>]
-UserName <String>
[-NewUserName <String>]
[-FullName <String>]
[-State <NavUserState>]
[-ExpiryDate <DateTime>]
[-LicenseType <LicenseType>]
[-AuthenticationKey <String>]
[-ContactEmail <String>]
[-AuthenticationEmail <String>]
[-CreateWebServicesKey]
[-WebServicesKeyExpiryDate <DateTime>]
[-ProfileId <String>]
[-ProfileAppId <Guid>]
[-AuthenticationObjectId <String>]
[-Company <String>]
[-LanguageId <String>]
[-ServerInstance] <String>
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-NAVServerUser
[-Tenant <TenantId>]
[-NewWindowsAccount <String>]
-UserName <String>
[-NewUserName <String>]
[-FullName <String>]
[-State <NavUserState>]
[-ExpiryDate <DateTime>]
[-ChangePasswordAtNextLogOn]
[-LicenseType <LicenseType>]
-Password <SecureString>
[-AuthenticationKey <String>]
[-ContactEmail <String>]
[-AuthenticationEmail <String>]
[-CreateWebServicesKey]
[-WebServicesKeyExpiryDate <DateTime>]
[-ProfileId <String>]
[-ProfileAppId <Guid>]
[-AuthenticationObjectId <String>]
[-Company <String>]
[-LanguageId <String>]
[-ServerInstance] <String>
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-NAVServerUser
[-Tenant <TenantId>]
[-NewWindowsAccount <String>]
-UserName <String>
[-NewUserName <String>]
[-FullName <String>]
[-State <NavUserState>]
[-ExpiryDate <DateTime>]
[-AuthenticationKey <String>]
[-ContactEmail <String>]
-ApplicationId <Guid>
[-Company <String>]
[-LanguageId <String>]
[-ServerInstance] <String>
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Use the Set-NAVServerUser cmdlet to rename an existing Business Central user or change other configuration parameters that are related to the user.
Set-NAVServerUser DynamicsNAV90 -Sid S-1-5-20 -NewWindowsAccount MyDomain\User1
This example renames the Windows account user name of a Business Central user. The existing Business Central user is identified by its Sid.
Set-NAVServerUser BC -WindowsAccount MyDomain\User1 -NewWindowsAccount MyDomain\User2
This example changes the Windows user name that is assigned to Business Central user. The existing Business Central user is identified by its current Windows user name by the WindowsAccount parameter.
Set-NAVServerUser DynamicsNAV90 -UserName USER1 -NewUserName USER2 -ChangePasswordAtNextLogOn -Password (Read-Host "Enter password for USER2" -AsSecureString)
This example changes the user name of a Business Central 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 Business Central.
Identifies the application this user represents. This requires that the application is registered in Microsoft Entra ID. The application is identified by its "client id" in Microsoft Entra ID.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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 Entra ID.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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 Business Central.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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 Entra ID.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Forces the user to change the password the next time that the user logs on.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies which of the Business Central companies will be used as the user's default company in the clients. Be aware that if you set this parameter, you will not be able to remove the user later if desired. You will only be able to disable the user.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Prompts you for confirmation before executing the command.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the contact email address for the Business Central user.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Creates a web services access key for the user. The web service access key is automatically generated.
This parameter is relevant only when Business Central 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.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies when the user's access to Business Central expires.
Type: | DateTime |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Sets the full name of the user.
On the User card in Business Central, this value appears in the Full Name field. The value typically includes the user's first and last name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies which of the installed Business Central languages will be used as the user's default language in the clients. Set the value to a valid language culture name, which typically has the format nn-NN, such as en-US or da-DK. Be aware that if you set this parameter, you will not be able to remove the user later if desired. You will only be able to disable the user.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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 Business Central user is based on a Windows group in Active Directory. This user account cannot log on to Business Central. 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)
Type: | LicenseType |
Accepted values: | Full, Limited, DeviceOnly, WindowsGroup, External, ExternalAdmin, ExternalAccountant, Application |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the new user name to assign the Business Central user. The user name is defined by the User Name field in the user's account in Business Central.
You cannot use the NewUserName parameter and NewWindowsAccount parameter in the same command.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the new Windows user name for the Business Central 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.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies a protected password for the Business Central user.
The password is only used when the credential type for authenticating users who try to access Business Central is set to NavUserPassword.
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the ID of the extension that defines the profile to assign the user. When assigning a profile from the System scope, this parameter should not be used.
Type: | Guid |
Position: | Named |
Default value: | 00000000-0000-0000-0000-000000000000 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the ID of a profile to assign the user.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the name of a Business Central Server instance, for example, BC or myinstance. You can specify either the full name of an instance, such as MicrosoftDynamicsNavServer$myinstance or the short name such as myinstance.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the security identifier (SID) of the Business Central 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.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Sets the current state of the user's access to Business Central. The parameters has the following values (you can use either the text value of the integer value in parenthesis:
Enabled (0)
Disabled (1)
Type: | NavUserState |
Accepted values: | Enabled, Disabled |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the ID of the tenant of the Business Central Server instance that the user is stored in.
You can omit the Tenant parameter only if the Business Central Server instance is not configured to run multiple tenants.
Type: | TenantId |
Aliases: | Id |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the user name of the existing Business Central user that you want to change. The user name appears in the User Name field in a user's account in Business Central.
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.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the date and time when the user's web services access key expires.
Type: | DateTime |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Describes what would happen if you executed the command without actually executing the command.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the Windows account user name of the existing Business Central 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.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
System.String
You can pipe a string that contains a Business Central Server instance name to the cmdlet.
None