Export-NAVAppPermissionSet

Exports the specified permission set(s) from a Microsoft Dynamics NAV database to a file.

Syntax

Export-NAVAppPermissionSet
      -PermissionSetId <String[]>
      [-ServerInstance] <String>
      -Path <String>
      [-PassThru]
      [-Force]
      [<CommonParameters>]

Description

Use the Export-NAVAppPermissionSet cmdlet to export a permission set (or multiple permission sets) from a Microsoft Dynamics NAV database to a file.

Examples

Example 1

Export-NAVAppPermissionSet -ServerInstance DynamicsNAV -Path '.\PermissionSet.xml' -PermissionSetId PSA-VIEW

This example exports the permission set with the ID "PSA-VIEW" in the database that is used by the DynamicsNAV server instance to the PermissionSet.xml file.

Example 2

$PermissionSetFile=Export-NAVAppPermissionSet -ServerInstance DynamicsNAV -Path '.\PermissionSet.xml' -PermissionSetId PSA-VIEW -PassThru

          Mode             LastWriteTime            Length Name
          ----             -------------            ------ ----
          -a---            8/5/2017   11:47 AM         450 PermissionSet.xml

This example exports the permission set with the ID "PSA-VIEW" in the database that is used by the DynamicsNAV server instance to the PermissionSet.xml file, and then returns the location of the file to a variable. The variable could then be used when creating a package. (Example: Get-NAVAppManifest -Path '.\Manifest-Proseware SmartStuff.xml' | New-NAVAppPackage -Path 'C:\Proseware SmartStuff.navx' -SourcePath C:\NavExtensionFiles, $PermissionSetFile

Required Parameters

-Path

Specifies the name and location of the file that the permissions set is exported to.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PermissionSetId

Specifies the permission set ID(s) that will be exported.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServerInstance

Specifies the Microsoft Dynamics NAV Server instance that the permission set will be exported from, such as DynamicsNAV.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False

Optional Parameters

-Force

Forces the command to run without asking for user confirmation to overwrite an existing permission set file at the given path.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

Returns the path to the permission set file.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False