Share via


Copy-ServiceFabricServicePackageToNode

Copies a service package to a target node.

Syntax

Default (Default)

Copy-ServiceFabricServicePackageToNode
    [-ServiceManifestName] <String>
    [-ApplicationTypeName] <String>
    [-ApplicationTypeVersion] <String>
    [-NodeName] <String>
    [-PackageSharingPolicies <PackageSharingPolicy[]>]
    [-TimeoutSec <Int32>]
    [<CommonParameters>]

Description

The Copy-ServiceFabricServicePackageToNode cmdlet copies a service package to the Image cache and shared folders on a target node. You can run this cmdlet to pre-populate nodes with required code, config, and data packages. Later service creation operations can finish more quickly.

To manage Service Fabric clusters, start Windows PowerShell by using the Run as administrator option. Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet.

Examples

Example 1: Generate a package share policy

PS C:\> $sharingPolicy = new-ServiceFabricPackageSharingPolicy -PackageName CalcService5 -SharingScopeAll

This command generates a package share policy by using New-ServiceFabricPackageSharingPolicy cmdlet and assigns it to the variable named $sharingPolicy.

Example 2: Copy a service package

PS C:\> Copy-ServiceFabricServicePackageToNode -ServiceManifestName CalcService5 -ApplicationTypeName CalcServiceApp -ApplicationTypeVersion 5.0 -NodeName Node4 -PackageSharingPolicies $sharingPolicy -TimeoutSec 600 -Verbose

The command copies the service package belonging to application type "CalcServiceApp," application version "5.0," and service manifest "CalcService5" to Node4 with previously generated share policy object $sharePolicy.

Parameters

-ApplicationTypeName

Specifies the name for a Service Fabric application type. The cmdlet copies packages for the application type that this parameter specifies.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ApplicationTypeVersion

Specifies the version of a Service Fabric application type. The cmdlet copies packages for the application type version that this parameter specifies.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NodeName

Specifies the name of a Service Fabric node. The cmdlet copies the service package to the node that you specify.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:4
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PackageSharingPolicies

Specifies an array of package sharing policies that describe which packages to copy to the shared packages folder on the target node. To obtain a PackageSharingPolicy object, use the New-ServiceFabricPackageSharingPolicy cmdlet.

Parameter properties

Type:

PackageSharingPolicy[]

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

-ServiceManifestName

Specifies the name of a Service Fabric service package.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TimeoutSec

Specifies the time-out period, in seconds, for the operation.

Parameter properties

Type:Int32
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

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

None

Outputs

System.Object