Export-NAVAppPermissionSet

Exports the specified permission set(s) from a Business Central 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 Business Central database to a file.

Examples

Example 1

Export-NAVAppPermissionSet -ServerInstance BC -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 BC server instance to the PermissionSet.xml file.

Example 2

$PermissionSetFile=Export-NAVAppPermissionSet -ServerInstance BC -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 BC 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

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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Returns the path to the permission set file.

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

-Path

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PermissionSetId

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

Type:String[]
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ServerInstance

Specifies the Business Central Server instance that the permission set will be exported from, such as BC.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False