Use the New-NAVServerUserPermissionSet cmdlet to assign a permission set to a Business Central user.
Use the UserName, Sid or the WindowsAccount parameter to identify the user. Use the PermissionSetID parameter to identify the permission set.
Examples
EXAMPLE 1
New-NAVServerUserPermissionSet BC -WindowsAccount cronus\chris -PermissionSetId BASIC
This example adds the BASIC permission set for Windows user Cronus\Chris.
Parameters
-AppName
Specifies the name of the Business Central extension.
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
-AppPublisher
Specifies the publisher of the Business Central extension.
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
-CompanyName
The name of the Business Central company on which to apply the permission set.
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
-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
-PermissionSetId
The ID of an existing permission set in the Business Central database, such as SUPER, CASHFLOW, or BASIC.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Scope
Specifies whether the permission set that you want to apply is a System or Tenant permission set. A System permission set is a permission set that is stored in table 2000000004 Permission Set of the application database, and will apply to all tenants in the system. A Tenant permission set is a permission set that is stored in table 2000000166 Tenant Permission Set of the tenant database, and will apply to specific tenants. Tenant permission sets are primarily used with NAV extensions.
Parameter properties
Type:
PermissionScope
Default value:
None
Accepted values:
System, Tenant
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
-ServerInstance
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.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Sid
Specifies a security identifier (SID) for a Business Central user. The SID is a unique value that identifies a Windows user account.
You can use the Sid, UserName, or WindowsAccount parameters to identify the user.
If you use the Sid parameter, then do not 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
-Tenant
Specifies a ID of the tenant that is mounted on the Business Central Server instance.
You can omit the Tenant parameter only if the Business Central 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 Business Central user to assign the permission set to. The user name is defined by 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.
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
-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 user name of a Business Central user to assign the permission set to. The value has the domain\username format.
You can use the WindowsAccount, UserName, or Sid parameters to identify 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
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 Business Central Server instance name to the cmdlet.