< Back

Set-AzureAvailabilitySet

Wed Jan 30, 2019 5:53 pm

NAME Set-AzureAvailabilitySet



SYNOPSIS

Sets the name of the availability set on an Azure virtual machine.





SYNTAX

Set-AzureAvailabilitySet [-AvailabilitySetName] <String> -VM <IPersistentVM> [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>]

[-InformationVariable <String>] [<CommonParameters>]





DESCRIPTION

The Set-AzureAvailabilitySet cmdlet sets the name of the availability set on an Azure virtual machine after deployment.





PARAMETERS

-AvailabilitySetName <String>

Specifies the name of the availability set to which the virtual machine belongs.



Required? true

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-VM <IPersistentVM>

Specifies the virtual machine configuration that this cmdlet modifies.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-Profile <AzureSMProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationAction <ActionPreference>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationVariable <String>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES









-------------------------- Example 1: Modify the name of an availability set --------------------------



PS C:\\>Get-AzureVM -ServiceName "ContosoService" -Name "VirtualMachine24" | Set-AzureAvailabilitySet -Name "AvailabilitySet14" | Update-AzureVM



The first command gets the virtual machine named VirtualMachine07 in the service named ContosoService by using the Get-AzureVM cmdlet. The command

passes that object to the current cmdlet by using the pipeline operator. That cmdlet modifies the name of the availability set for that virtual machine.

The command updates the virtual machine.



RELATED LINKS

Get-AzureVM

Remove-AzureAvailabilitySet