Export-NAVAppTenantWebService

Exports the specified web service from a Business Central database to a file.

Syntax

Export-NAVAppTenantWebService
      -ServiceName <String>
      -ObjectType <String>
      -ObjectId <Int32>
      [-Tenant <TenantId>]
      [-ServerInstance] <String>
      -Path <String>
      [-PassThru]
      [-Force]
      [-ProgressAction <ActionPreference>]
      [<CommonParameters>]

Description

Use the Export-NAVAppTenantWebService cmdlet to export a web service from a Business Central database to a file.

Examples

Example 1

Export-NAVAppTenantWebService -ServerInstance BC -Path .\TenantWebService.xml -ServiceName Customer -ObjectType Page -ObjectId 21

This example exports the web service with the name "Customer" on the Page 21 object in the database that is used by the BC server instance to the TenantWebService.xml file.

Example 2

Export-NAVAppTenantWebService -ServerInstance BC -Path .\TenantWebService.xml -ServiceName Customer -ObjectType Page -ObjectId 21 -PassThru

          Mode             LastWriteTime            Length Name
          ----             -------------            ------ ----
          -a---            11/25/2017   11:47 AM         450 TenantWebService.xml

This example exports the web service with the name "Customer" on the Page 21 object in the database that is used by the BC server instance to the TenantWebService.xml file, then returns the location of the file.

Parameters

-Force

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

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

-ObjectId

Specifies the object ID of the web service that will be exported.

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

-ObjectType

Specifies the object type of the web service that will be exported.

Type:String
Accepted values:CodeUnit, Page, Query
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PassThru

Returns the path to the web service 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 web service is exported to.

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

-ProgressAction

A common PowerShell parameter that determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider. Learn more.

Type:ActionPreference
Aliases:proga
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ServerInstance

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

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

-ServiceName

Specifies the service name of the web service that will be exported.

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

-Tenant

Specifies the tenant from which to export data. If the server instance is configured for single tenant, do not set the parameter.

Type:TenantId
Aliases:Id
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

System.String

By property name: ServiceName

System.String

By property name: ObjectType

System.Int32

By property name: ObjectId

Microsoft.Dynamics.Nav.Types.TenantId

By property name: Tenant

System.String

By value and by property name: ServerInstance

System.String

By property name: Path