title | description | services | author | manager | ms.assetid | ms.service | ms.topic | ms.date | ms.author | ms.custom |
---|---|---|---|---|---|---|---|---|---|---|
Create a Service Fabric cluster in PowerShell |
Azure PowerShell Script Sample - Create a Service Fabric cluster secured with an X.509 certificate. |
service-fabric |
athinanthny |
chackdan |
0f9c8bc5-3789-4eb3-8deb-ae6e2200795a |
service-fabric |
sample |
01/19/2018 |
atsenthi |
mvc, devx-track-azurepowershell |
This sample script creates a five-node Service Fabric cluster secured with an X.509 certificate. The command creates a self-signed certificate and uploads it to a new key vault. The certificate is also copied to a local directory. Set the -OS parameter to choose the version of Windows or Linux that runs on the cluster nodes. Customize the parameters as needed.
[!INCLUDE updated-for-az]
If needed, install the Azure PowerShell using the instruction found in the Azure PowerShell guide and then run Connect-AzAccount
to create a connection with Azure.
[!code-powershellmain]
After the script sample has been run, the following command can be used to remove the resource group, cluster, and all related resources.
$groupname="mysfclustergroup"
Remove-AzResourceGroup -Name $groupname -Force
This script uses the following commands. Each command in the table links to command specific documentation.
Command | Notes |
---|---|
New-AzServiceFabricCluster | Creates a new Service Fabric cluster. |
For more information on the Azure PowerShell module, see Azure PowerShell documentation.
Additional Azure PowerShell samples for Azure Service Fabric can be found in the Azure PowerShell samples.