Get-NAVServerPermission

Get-NAVServerPermission

Returns information about Microsoft Dynamics NAV permissions for the specified Microsoft Dynamics NAV Server instance, filtered by permission set ID, object type, and/or object ID.

Syntax

Parameter Set: __AllParameterSets
Get-NAVServerPermission [-ServerInstance] <String> [-AsXml] [-ObjectId <Int32> ] [-ObjectType <ObjectType> ] [-PermissionSetId <String> ] [ <CommonParameters>]

Detailed Description

Use the Get-NAVServerPermission cmdlet to return information about Microsoft Dynamics NAV permissions for the specified Microsoft Dynamics NAV Server instance, filtered by permission set ID, object type, and/or object ID.

Parameters

-AsXml

Formats cmdlet output as an XML node.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ObjectId<Int32>

Specifies an Object ID, such as 7702.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ObjectType<ObjectType>

Specifies an Object Type, such as TableData or MenuSuite. Always remove spaces when specifying an Object Type. You can also use integers to specify the Object Type:

TableData = 0

Table = 1

Form = 2

Report = 3

Dataport = 4

CodeUnit = 5

XmlPort = 6

MenuSuite = 7

Page = 8

Query = 9

System = 10

FieldNumber = 11

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PermissionSetId<String>

Specifies the ID for a permission set, such as SUPER or BASIC.

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 DynamicsNAV70. 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

<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.

  • System.Data.DataTable

    Returns the Microsoft Dynamics NAV Server permissions information as a table.

  • System.Xml.XmlElement

    If you use the AsXml parameter, then the cmdlet returns the Microsoft Dynamics NAV Server permissions information as an XML element.

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

This example returns information about all permission sets that include permissions for object 7700.

C:\PS>Get-NavServerPermission DynamicsNAV70 -ObjectId 7700


PermissionSet ID   : ADCS ALL
Object Type        : Table Data
Object ID          : 7700
Read Permission    : Yes
Insert Permission  :
Modify Permission  :
Delete Permission  :
Execute Permission :
Security Filter    :
PermissionSet Name : ADCS User
Object Name        : Miniform Header

PermissionSet ID   : ADCS SETUP
Object Type        : Table Data
Object ID          : 7700
Read Permission    : Yes
Insert Permission  : Yes
Modify Permission  : Yes
Delete Permission  : Yes
Execute Permission :
Security Filter    :
PermissionSet Name : ADCS Set-up
Object Name        : Miniform Header

-------------------------- EXAMPLE 2 --------------------------

Description

-----------

This example returns information about all permission sets that include permissions for object 7700, in XML format.

C:\PS>Get-NAVServerPermission DynamicsNav70 -ObjectId 7700 -AsXml | fc

class XmlElement
{
Permission =
[
class XmlElement
{
PermissionSet_x0020_ID = ADCS ALL
Object_x0020_Type = Table Data
Object_x0020_ID = 7700
Read_x0020_Permission = Yes
Insert_x0020_Permission =
class XmlElement
{
space = preserve
#significant-whitespace =
}
Modify_x0020_Permission =
class XmlElement
{
space = preserve
#significant-whitespace =
}
Delete_x0020_Permission =
class XmlElement
{
space = preserve
#significant-whitespace =
}
Execute_x0020_Permission =
class XmlElement
{
space = preserve
#significant-whitespace =
}
Security_x0020_Filter =
PermissionSet_x0020_Name = ADCS User
Object_x0020_Name = Miniform Header
}
class XmlElement
{
PermissionSet_x0020_ID = ADCS SETUP
Object_x0020_Type = Table Data
Object_x0020_ID = 7700
Read_x0020_Permission = Yes
Insert_x0020_Permission = Yes
Modify_x0020_Permission = Yes
Delete_x0020_Permission = Yes
Execute_x0020_Permission =
class XmlElement
{
space = preserve
#significant-whitespace =
}
Security_x0020_Filter =
PermissionSet_x0020_Name = ADCS Set-up
Object_x0020_Name = Miniform Header
}
]

}