AzureRM PowerShell modules would be retired on 29 February 2024, Az PowerShell modules now have all the capabilities of AzureRM PowerShell modules.
This blog shows AZ module setup and common commands to manage your Azure Service Fabric.
Table of Contents
Notes:
Az module setup:
This section will cover how to setup the AZ module in your environment.
You can skip this part, If you have already setup a local environment for with the AZ module.
Step 1: check if you have AzureRM module.
If you do have the AzureRM installed, you will need to remove AzureRM module first.
Run code:
if ($PSVersionTable.PSEdition -eq 'Desktop' -and (Get-Module -Name AzureRM -ListAvailable)) {
Write-Warning -Message ('Az module not installed. Having both the AzureRM and ' +
'Az modules installed at the same time is not supported.')
} else {
Install-Module -Name Az -AllowClobber -Scope CurrentUser
}
Step2: install AZ module and remove AzureRM module
Uninstall AzureRM module: https://docs.microsoft.com/en-us/powershell/azure/uninstall-az-ps?view=azps-5.6.0#option-2-uninstall...
First run code:
Install-Module -Name Az -AllowClobber -Scope CurrentUser
Then run code as an admin:
Uninstall-AzureRm
Common commands
To login, you will need to run the following command:
Connect-AzAccount
After sign in, you will be able to see the subscriptions you can work with:
(Optional) If you want to change a subscription to work with, run the following codes:
Run code:
$context = Get-AzSubscription -SubscriptionId ...
Set-AzContext $context
Use the Get-AzServiceFabricCluster command to get the information for a specific SF cluster.
Run code:
Get-AzServiceFabricCluster -ResourceGroupName 'haileyservicefabrictest' -ClusterName 'haileysftest'
You can run the following code to add nodes to your specific cluster.
Add-AzureRmServiceFabricNode -ResourceGroupName 'haileyservicefabrictest' -ClusterName 'haileysftest' -NodeType 'Type456' -Number 2
Run codes:
Add-AzServiceFabricNodeType -ResourceGroupName $resourceGroupName -ClusterName $clusterName -NodeType $nodeType -Capacity $capacity -VmUserName $vmUsername -VmPassword $pwd
Using the following command to update the durability tier or VmSku of a node type in the cluster.
Update-AzServiceFabricDurability -ResourceGroupName 'haileyservicefabrictest' -Name 'haileysftest' -DurabilityLevel Silver -NodeType 'mynodetype’
Use the following command to update the reliability tier of the primary node type in a cluster.
Update-AzServiceFabricReliability -ResourceGroupName 'haileyservicefabrictest' -Name 'haileysftest' -ReliabilityLevel Silver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.