Utility: Service Fabric PowerShell


icon Run a PowerShell script within the context of an Azure Service Fabric cluster connection.

Runs any PowerShell command or script in a PowerShell session that has a Service Fabric cluster connection initialized.


Service Fabric

  • This task uses a Service Fabric installation to connect and deploy to a Service Fabric cluster.

  • Azure Service Fabric Core SDK on the build agent.


Argument Description
Cluster Connection The Azure Service Fabric service endpoint to use to connect and authenticate to the cluster.
Script Type Specify whether the script is provided as a file or inline in the task.
Script Path Path to the PowerShell script to run. Can include wildcards and variables. Example: $(system.defaultworkingdirectory)/**/drop/projectartifacts/**/docker-compose.yml. Note: combining compose files is not supported as part of this task.
Script Arguments Additional parameters to pass to the PowerShell script. Can be either ordinal or named parameters.
Inline Script The PowerShell commands to run on the build agent. More information
Control options See Control options

Also see: Service Fabric Compose Deploy task

YAML snippet


- task: ServiceFabricPowerShell@1
#   ScriptType: FilePath # FilePath (default), InlineScript
#   Inline: # You can write your PowerShell scripts inline here. # You can also pass predefined and custom variables to this script using arguments


Do I need an agent?

You need at least one agent to run your build or release. Get an agent.

I can't select a default agent queue and I can't queue my build or release. How do I fix this?

See Agent pools and queues.

Help and support