Skip to content

Latest commit

 

History

History
259 lines (252 loc) · 28.4 KB

SFPowershellUsage.md

File metadata and controls

259 lines (252 loc) · 28.4 KB

Microsoft.ServiceFabric.Powershell.Http Powershell Module

The new Service Fabric Powershell module works over HTTP with the service Fabric HTTP Gateway. The module can be used with following:

Getting the module

The module is available in Powershell Gallery, for more information on downloading packages from Powershell Gallery, please see Downloading packages from the PowerShell Gallery.

Powershell Core

Service Fabric REST Powershell module is available in Powershell Gallery and can be installed as

Install-Module -Name Microsoft.ServiceFabric.Powershell.Http -AllowPrerelease
Import-Module -Name Microsoft.ServiceFabric.Powershell.Http

Windows Powershell

Service Fabric REST Powershell module is available in Powershell Gallery and can be installed as

Install-Module -Name Microsoft.ServiceFabric.Powershell.Http -AllowPrerelease

Note: You might have to update the PowerShellGet module (if its version is less than 1.6.0) to get support for -AllowPrerelease flag. It can be updated as:

Install-Module -Name PowerShellGet -Force

PS Module and Service Fabric Runtime Compatibility

Module Version Compatible Service Fabric Runtime version
1.6.0-preview* >= 9.1.*
1.4.6-preview* >= 8.2.*
1.4.4-preview* >= 8.0.*
1.4.2-preview* >= 7.2.*
1.4.1-preview* >= 7.1.*
1.4.0-preview* >= 7.0.*
1.0.3-preview* >= 6.4.*

Connecting to Cluster

Connecting to unsecured cluster

Connect-SFCluster -ConnectionEndpoint http://<cluster_fqdn>:<httgateway_port>

Connecting to cluster secured with X509 certificate and Azure Active Directory

Please see Connect-SFCluster cmdlet for information on how to connect to a secured cluster.

Commands

Following is the list of commands available in this module:

Command Summary
Add-SFMeshSecretValue Adds the specified value as a new version of the specified secret resource.
Backup-SFPartition Triggers backup of the partition's state.
Connect-SFCluster Cmdlet to connect to Service Fabric cluster.
Copy-SFApplicationPackage Uploads application package to image store.
Copy-SFImageStoreContent Copies image store content internally
Copy-SFServicePackageToNode Downloads all of the code packages associated with specified service manifest on the specified node.
Disable-SFApplicationBackup Disables periodic backup of Service Fabric application.
Disable-SFNode Deactivate a Service Fabric cluster node with the specified deactivation intent.
Disable-SFPartitionBackup Disables periodic backup of Service Fabric partition which was previously enabled.
Disable-SFServiceBackup Disables periodic backup of Service Fabric service which was previously enabled.
Enable-SFApplicationBackup Enables periodic backup of stateful partitions under this Service Fabric application.
Enable-SFNode Activate a Service Fabric cluster node that is currently deactivated.
Enable-SFPartitionBackup Enables periodic backup of the stateful persisted partition.
Enable-SFServiceBackup Enables periodic backup of stateful partitions under this Service Fabric service.
Get-SFAadMetadata Gets the Azure Active Directory metadata used for secured connection to cluster.
Get-SFAllEntitiesBackedUpByPolicy Gets the list of backup entities that are associated with this policy.
Get-SFApplication Gets the list of applications created in the Service Fabric cluster that match the specified filters.
Get-SFApplicationBackupConfigurationInfo Gets the Service Fabric application backup configuration information.
Get-SFApplicationBackupList Gets the list of backups available for every partition in this application.
Get-SFApplicationHealth Gets the health of the service fabric application.
Get-SFApplicationHealthUsingPolicy Gets the health of a Service Fabric application using the specified policy.
Get-SFApplicationLoadInfo Gets load information about a Service Fabric application.
Get-SFApplicationManifest Gets the manifest describing an application type.
Get-SFApplicationNameInfo Gets the name of the Service Fabric application for a service.
Get-SFApplicationsEvent Gets all Applications-related events.
Get-SFApplicationType Gets the list of application types in the Service Fabric cluster.
Get-SFApplicationUpgrade Gets details for the latest upgrade performed on this application.
Get-SFBackupPolicy Gets all the backup policies configured.
Get-SFBackupsFromBackupLocation Gets the list of backups available for the specified backed up entity at the specified backup location.
Get-SFChaos Get the status of Chaos.
Get-SFChaosEvents Gets the next segment of the Chaos events based on the continuation token or the time range.
Get-SFChaosSchedule Get the Chaos Schedule defining when and how to run Chaos.
Get-SFClusterConfiguration Get the Service Fabric standalone cluster configuration.
Get-SFClusterConfigurationUpgradeStatus Get the cluster configuration upgrade status of a Service Fabric standalone cluster.
Get-SFClusterEventList Gets all Cluster-related events.
Get-SFClusterHealth Gets the health of a Service Fabric cluster.
Get-SFClusterHealthChunk Gets the health of a Service Fabric cluster using health chunks.
Get-SFClusterHealthChunkUsingPolicyAndAdvancedFilters Gets the health of a Service Fabric cluster using health chunks.
Get-SFClusterHealthUsingPolicy Gets the health of a Service Fabric cluster using the specified policy.
Get-SFClusterManifest Get the Service Fabric cluster manifest.
Get-SFClusterUpgradeProgress Gets the progress of the current cluster upgrade.
Get-SFClusterVersion Get the current Service Fabric cluster version.
Get-SFComposeDeploymentStatus Gets information about a Service Fabric compose deployment.
Get-SFComposeDeploymentStatusList Gets the list of compose deployments created in the Service Fabric cluster.
Get-SFComposeDeploymentUpgradeProgress Gets details for the latest upgrade performed on this Service Fabric compose deployment.
Get-SFContainerLogsDeployedOnNode Gets the container logs for container deployed on a Service Fabric node.
Get-SFContainerLogsMeshCodePackage Gets the logs from the container.
Get-SFContainersEventList Gets all Containers-related events.
Get-SFCorrelatedEventList Gets all correlated events for a given event.
Get-SFDataLossProgress Gets the progress of a partition data loss operation started using the StartDataLoss API.
Get-SFDeployedApplication Gets the list of applications deployed on a Service Fabric node.
Get-SFDeployedApplicationHealth Gets the information about health of an application deployed on a Service Fabric node.
Get-SFDeployedApplicationHealthUsingPolicy Gets the information about health of an application deployed on a Service Fabric node. using the specified policy.
Get-SFDeployedCodePackageInfoList Gets the list of code packages deployed on a Service Fabric node.
Get-SFDeployedServicePackage Gets the list of service packages deployed on a Service Fabric node.
Get-SFDeployedServicePackageHealth Gets the information about health of a service package for a specific application deployed for a Service Fabric node and application.
Get-SFDeployedServicePackageHealthUsingPolicy Gets the information about health of service package for a specific application deployed on a Service Fabric node using the specified policy.
Get-SFDeployedServiceReplicaDetail Gets the details of replica deployed on a Service Fabric node.
Get-SFDeployedServiceReplicaInfoList Gets the list of replicas deployed on a Service Fabric node.
Get-SFDeployedServiceType Gets the list containing the information about service types from the applications deployed on a node in a Service Fabric cluster.
Get-SFFaultOperationList Gets a list of user-induced fault operations filtered by provided input.
Get-SFImageStoreContent Gets the image store content information.
Get-SFImageStoreRootContent Gets the content information at the root of the image store.
Get-SFImageStoreUploadSessionById Get the image store upload session by ID.
Get-SFImageStoreUploadSessionByPath Get the image store upload session by relative path.
Get-SFMeshApplication Lists all the application resources.
Get-SFMeshGateway Lists all the gateway resources.
Get-SFMeshNetwork Lists all the network resources.
Get-SFMeshSecret Lists all the secret resources.
Get-SFMeshSecretValue List names of all values of the the specified secret resource.
Get-SFMeshService Lists all the service resources.
Get-SFMeshServiceReplica Lists all the replicas of a service.
Get-SFMeshVolume Lists all the volume resources.
Get-SFNameExistsInfo Returns whether the Service Fabric name exists.
Get-SFNode Gets the list of nodes in the Service Fabric cluster.
Get-SFNodeHealth Gets the health of a Service Fabric node.
Get-SFNodeHealthUsingPolicy Gets the health of a Service Fabric node, by using the specified health policy.
Get-SFNodeLoadInfo Gets the load information of a Service Fabric node.
Get-SFNodesEvent Gets all Nodes-related Events.
Get-SFNodeTransitionProgress Gets the progress of an operation started using StartNodeTransition.
Get-SFPartition Gets the list of partitions of a Service Fabric service.
Get-SFPartitionBackupConfigurationInfo Gets the partition backup configuration information
Get-SFPartitionBackupList Gets the list of backups available for the specified partition.
Get-SFPartitionBackupProgress Gets details for the latest backup triggered for this partition.
Get-SFPartitionHealth Gets the health of the specified Service Fabric partition.
Get-SFPartitionHealthUsingPolicy Gets the health of the specified Service Fabric partition, by using the specified health policy.
Get-SFPartitionLoadInformation Gets the load information of the specified Service Fabric partition.
Get-SFPartitionReplicasEvent Gets all Replicas-related events for a Partition.
Get-SFPartitionRestartProgress Gets the progress of a PartitionRestart operation started using StartPartitionRestart.
Get-SFPartitionRestoreProgress Gets details for the latest restore operation triggered for this partition.
Get-SFPartitionsEvent Gets all Partitions-related events.
Get-SFPropertyInfo Gets the specified Service Fabric property.
Get-SFPropertyInfoList Gets information on all Service Fabric properties under a given name.
Get-SFProvisionedFabricCodeVersionInfoList Gets a list of fabric code versions that are provisioned in a Service Fabric cluster.
Get-SFProvisionedFabricConfigVersionInfoList Gets a list of fabric config versions that are provisioned in a Service Fabric cluster.
Get-SFQuorumLossProgress Gets the progress of a quorum loss operation on a partition started using the StartQuorumLoss API.
Get-SFRepairTaskList Gets a list of repair tasks matching the given filters.
Get-SFReplica Gets the information about replicas of a Service Fabric service partition.
Get-SFReplicaHealth Gets the health of a Service Fabric stateful service replica or stateless service instance.
Get-SFReplicaHealthUsingPolicy Gets the health of a Service Fabric stateful service replica or stateless service instance using the specified policy.
Get-SFService Gets the information about all services belonging to the application specified by the application ID.
Get-SFServiceBackupConfigurationInfo Gets the Service Fabric service backup configuration information.
Get-SFServiceBackupList Gets the list of backups available for every partition in this service.
Get-SFServiceDescription Gets the description of an existing Service Fabric service.
Get-SFServiceHealth Gets the health of the specified Service Fabric service.
Get-SFServiceHealthUsingPolicy Gets the health of the specified Service Fabric service, by using the specified health policy.
Get-SFServiceManifest Gets the manifest describing a service type.
Get-SFServiceNameInfo Gets the name of the Service Fabric service for a partition.
Get-SFServicesEvent Gets all Services-related events.
Get-SFServiceType Gets the list containing the information about service types that are supported by a provisioned application type in a Service Fabric cluster.
Get-SFSubNameInfoList Enumerates all the Service Fabric names under a given name.
Get-SFUpgradeOrchestrationServiceState Get the service state of Service Fabric Upgrade Orchestration Service.
New-SFApplication Creates a Service Fabric application.
New-SFApplicationHealth Sends a health report on the Service Fabric application.
New-SFApplicationUpgrade Starts rolling back the currently on-going upgrade of an application in the Service Fabric cluster.
New-SFApproveRepairTask Forces the approval of the given repair task.
New-SFBackupPolicy Creates a backup policy.
New-SFChaosSchedule Set the schedule used by Chaos.
New-SFClusterHealth Sends a health report on the Service Fabric cluster.
New-SFClusterUpgrade Roll back the upgrade of a Service Fabric cluster.
New-SFComposeDeployment Creates a Service Fabric compose deployment.
New-SFContainerApi Invoke container API on a container deployed on a Service Fabric node.
New-SFDeployedApplicationHealth Sends a health report on the Service Fabric application deployed on a Service Fabric node.
New-SFDeployedServicePackageHealth Sends a health report on the Service Fabric deployed service package.
New-SFImageStoreUploadSession Commit an image store upload session.
New-SFInfrastructureCommand Invokes an administrative command on the given Infrastructure Service instance.
New-SFInfrastructureQuery Invokes a read-only query on the given infrastructure service instance.
New-SFMeshApplication Creates mesh application resource in service fabric cluster.
New-SFMeshGateway Creates mesh gateway resource in service fabric cluster.
New-SFMeshNetwork Creates mesh network resource in service fabric cluster.
New-SFMeshResourceDeployment Deploys mesh resources in a Service Fabric cluster.
New-SFMeshSecret Creates mesh secret resource in service fabric cluster.
New-SFMeshVolume Creates mesh volume resource in service fabric cluster.
New-SFName Creates a Service Fabric name.
New-SFNodeHealth Sends a health report on the Service Fabric node.
New-SFPartitionHealth Sends a health report on the Service Fabric partition.
New-SFProperty Creates or updates a Service Fabric property.
New-SFRepairTask Creates a new repair task.
New-SFReplicaHealth Sends a health report on the Service Fabric replica.
New-SFService Creates the specified Service Fabric service.
New-SFServiceFromTemplate Creates a Service Fabric service from the service template.
New-SFServiceHealth Sends a health report on the Service Fabric service.
Register-SFApplicationType Provisions or registers a Service Fabric application type with the cluster using the '.sfpkg' package in the external store or using the application package in the image store.
Register-SFCluster Provision the code or configuration packages of a Service Fabric cluster.
Remove-SFApplication Deletes an existing Service Fabric application.
Remove-SFBackupPolicy Deletes the backup policy.
Remove-SFComposeDeployment Deletes an existing Service Fabric compose deployment from cluster.
Remove-SFImageStoreContent Deletes existing image store content.
Remove-SFImageStoreUploadSession Cancels an image store upload session.
Remove-SFMeshApplication Deletes the Application resource.
Remove-SFMeshGateway Deletes the Gateway resource.
Remove-SFMeshNetwork Deletes the Network resource.
Remove-SFMeshSecret Deletes the Secret resource.
Remove-SFMeshSecretValue Deletes the specified value of the named secret resource.
Remove-SFMeshVolume Deletes the Volume resource.
Remove-SFName Deletes a Service Fabric name.
Remove-SFNodeState Notifies Service Fabric that the persisted state on a node has been permanently removed or lost.
Remove-SFProperty Deletes the specified Service Fabric property.
Remove-SFRepairTask Deletes a completed repair task.
Remove-SFReplica Removes a service replica running on a node.
Remove-SFService Deletes an existing Service Fabric service.
Repair-SFAllPartitions Indicates to the Service Fabric cluster that it should attempt to recover any services (including system services) which are currently stuck in quorum loss.
Repair-SFPartition Indicates to the Service Fabric cluster that it should attempt to recover a specific partition that is currently stuck in quorum loss.
Repair-SFServicePartitions Indicates to the Service Fabric cluster that it should attempt to recover the specified service that is currently stuck in quorum loss.
Repair-SFSystemPartitions Indicates to the Service Fabric cluster that it should attempt to recover the system services that are currently stuck in quorum loss.
Reset-SFPartitionLoad Resets the current load of a Service Fabric partition.
Resolve-SFService Resolve a Service Fabric partition.
Restart-SFDeployedCodePackage Restarts a code package deployed on a Service Fabric node in a cluster.
Restart-SFNode Restarts a Service Fabric cluster node.
Restart-SFReplica Restarts a service replica of a persisted service running on a node.
Restore-SFPartition Triggers restore of the state of the partition using the specified restore partition description.
Resume-SFApplicationBackup Resumes periodic backup of a Service Fabric application which was previously suspended.
Resume-SFApplicationUpgrade Resumes upgrading an application in the Service Fabric cluster.
Resume-SFClusterUpgrade Make the cluster upgrade move on to the next upgrade domain.
Resume-SFPartitionBackup Resumes periodic backup of partition which was previously suspended.
Resume-SFServiceBackup Resumes periodic backup of a Service Fabric service which was previously suspended.
Set-SFUpgradeOrchestrationServiceState Update the service state of Service Fabric Upgrade Orchestration Service.
Show-SFMeshSecretValue Lists the specified value of the secret resource.
Start-SFApplicationUpgrade Starts upgrading an application in the Service Fabric cluster.
Start-SFChaos Starts Chaos in the cluster.
Start-SFClusterConfigurationUpgrade Start upgrading the configuration of a Service Fabric standalone cluster.
Start-SFClusterUpgrade Start upgrading the code or configuration version of a Service Fabric cluster.
Start-SFComposeDeploymentUpgrade Starts upgrading a compose deployment in the Service Fabric cluster.
Start-SFDataLoss This API will induce data loss for the specified partition. It will trigger a call to the OnDataLossAsync API of the partition.
Start-SFNodeTransition Starts or stops a cluster node.
Start-SFPartitionRestart This API will restart some or all replicas or instances of the specified partition.
Start-SFQuorumLoss Induces quorum loss for a given stateful service partition.
Start-SFRollbackComposeDeploymentUpgrade Starts rolling back a compose deployment upgrade in the Service Fabric cluster.
Stop-SFChaos Stops Chaos if it is running in the cluster and put the Chaos Schedule in a stopped state.
Stop-SFOperation Cancels a user-induced fault operation.
Stop-SFRepairTask Requests the cancellation of the given repair task.
Submit-SFPropertyBatch Submits a property batch.
Suspend-SFApplicationBackup Suspends periodic backup for the specified Service Fabric application.
Suspend-SFPartitionBackup Suspends periodic backup for the specified partition.
Suspend-SFServiceBackup Suspends periodic backup for the specified Service Fabric service.
Test-SFClusterConnection Tests connection to Service Fabric cluster.
Unregister-SFApplicationType Removes or unregisters a Service Fabric application type from the cluster.
Unregister-SFCluster Unprovision the code or configuration packages of a Service Fabric cluster.
Update-SFApplicationUpgrade Updates an ongoing application upgrade in the Service Fabric cluster.
Update-SFBackupPolicy Updates the backup policy.
Update-SFClusterUpgrade Update the upgrade parameters of a Service Fabric cluster upgrade.
Update-SFMeshApplication Updates mesh application resource in service fabric cluster.
Update-SFMeshGateway Updates mesh gateway resource in service fabric cluster.
Update-SFMeshNetwork Updates mesh network resource in service fabric cluster.
Update-SFMeshSecret Updates mesh secret resource in service fabric cluster.
Update-SFMeshVolume Updates mesh volume resource in service fabric cluster.
Update-SFRepairExecutionState Updates the execution state of a repair task.
Update-SFRepairTaskHealthPolicy Updates the health policy of the given repair task.
Update-SFService Updates a Service Fabric service using the specified update description.