New-NAVServerPermission
Adds a permission to a permission set.
Syntax
Default (Default)
New-NAVServerPermission
-PermissionSetId <String>
-ObjectType <ObjectType>
-ObjectId <Int32>
[-SecurityFilter <String>]
[-Read <PermissionOption>]
[-Insert <PermissionOption>]
[-Modify <PermissionOption>]
[-Delete <PermissionOption>]
[-Execute <PermissionOption>]
[-ServerInstance] <String>
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Use the New-NAVServerPermission cmdlet to add a permission to a permission set.
Examples
EXAMPLE 1
Set-NAVServerPermission BC -PermissionSetId BASIC -ObjectType Page -ObjectId 21 -Read Indirect
This example updates the Read permission for the specified page object to Indirect for the BASIC permission set.
Parameters
-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 |
-Delete
Specifies whether the permission includes delete permission for the object. You can use either a string value (such as No) or a numeric value (such as 0).
No = 0
Yes = 1
Indirect = 2
Parameter properties
Type: | PermissionOption |
Default value: | None |
Accepted values: | No, Yes, Indirect |
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 |
-Execute
Specifies whether the permission includes execute permission for the object. You can use either a string value (such as No) or a numeric value (such as 0).
No = 0
Yes = 1
Indirect = 2
Parameter properties
Type: | PermissionOption |
Default value: | None |
Accepted values: | No, Yes, Indirect |
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 |
-Insert
Specifies whether the permission includes insert permission for the object. You can use either a string value (such as No) or a numeric value (such as 0).
No = 0
Yes = 1
Indirect = 2
Parameter properties
Type: | PermissionOption |
Default value: | None |
Accepted values: | No, Yes, Indirect |
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 |
-Modify
Specifies whether the permission includes modify permission for the object. You can use either a string value (such as No) or a numeric value (such as 0).
No = 0
Yes = 1
Indirect = 2
Parameter properties
Type: | PermissionOption |
Default value: | None |
Accepted values: | No, Yes, Indirect |
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 |
-ObjectId
Specifies the ID of the object the permission applies to.
Parameter properties
Type: | Int32 |
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 |
-ObjectType
Specifies the type of the object the permission applies to. You can use either a string value (such as TableData) or a numeric value (such as 0).
TableData = 0
Table = 1
Form = 2
Report = 3
Dataport = 4
CodeUnit = 5
XmlPort = 6
MenuSuite = 7
Page = 8
Query = 9
System = 10
FieldNumber = 11
Parameter properties
Type: | ObjectType |
Default value: | None |
Accepted values: | TableData, Table, Form, Report, Dataport, CodeUnit, XmlPort, MenuSuite, Page, Query, System, FieldNumber, LimitedUsageTableData, TablePage, PageExtension, TableExtension, Enum, EnumExtension, Profile, ProfileExtension, PermissionSet, PermissionSetExtension, ReportExtension, ExternalBusinessEvent, DynamicQuery, MovedObjectManifest |
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 |
-PermissionSetId
The ID of the permission set that you are updating, such as BASIC or SUPER.
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 |
-Read
Specifies whether the permission includes read permission for the object. You can use either a string value (such as No) or a numeric value (such as 0).
No = 0
Yes = 1
Indirect = 2
Parameter properties
Type: | PermissionOption |
Default value: | None |
Accepted values: | No, Yes, Indirect |
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 |
-SecurityFilter
Specifies a security filter for the permission.
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 |
-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 |
-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 |
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.
Outputs
None
Notes
Because cmdlets do not execute application code, if there is any logic on application objects that are associated with creating or modifying permissions from the client, be aware that the logic will not be executed when you run the cmdlet.