Share via


Export-NAVAppPermissionSet

Exports the specified permission set(s) from a Business Central database to a file.

Syntax

Default (Default)

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.

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

-PassThru

Returns the path to the permission set file.

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

-Path

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

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:True
Value from remaining arguments:False

-PermissionSetId

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

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:True
Value from remaining arguments:False

-ServerInstance

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

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

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

By property name: PermissionSetId

System.String

By value and by property name: ServerInstance

System.String

By property name: Path