Export-NAVAppTenantWebService
Exports the specified web service from a Business Central database to a file.
Syntax
Default (Default)
Export-NAVAppTenantWebService
-ServiceName <String>
-ObjectType <String>
-ObjectId <Int32>
[-Tenant <TenantId>]
[-ServerInstance] <String>
-Path <String>
[-PassThru]
[-Force]
[<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.
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 |
-ObjectId
Specifies the object ID of the web service that will be exported.
Parameter properties
Type: | Int32 |
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 |
-ObjectType
Specifies the object type of the web service 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 |
-PassThru
Returns the path to the web service 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 web service 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 |
-ServerInstance
Specifies the Business Central Server instance that the web service 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 |
-ServiceName
Specifies the service name of the web service 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 |
-Tenant
Specifies the tenant from which to export data. If the server instance is configured for single tenant, do not set the parameter.
Parameter properties
Type: | TenantId |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | Id |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
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: 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