Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Update-AzHost
- Module:
- Az.Compute Module
Updates the Dedicated Host.
Syntax
DefaultParameter (Default)
Update-AzHost
[-ResourceGroupName] <String>
[-HostGroupName] <String>
[-Name] <String>
[-Sku <String>]
[-AutoReplaceOnFailure <Boolean>]
[-LicenseType <DedicatedHostLicenseTypes>]
[-Redeploy]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ResourceIdParameter
Update-AzHost
[-ResourceId] <String>
[-Sku <String>]
[-AutoReplaceOnFailure <Boolean>]
[-LicenseType <DedicatedHostLicenseTypes>]
[-Redeploy]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
This cmdlet can be used to update the Dedicated Host Sku, LicenseType and AutoReplaceOnFailure property.
Examples
Example 1
Update-AzHost -ResourceGroupName $resourceGroupName -HostGroupName $hostGroupName -Name $hostName -Sku $skuName
ResourceGroupName : myrg01
PlatformFaultDomain : 0
AutoReplaceOnFailure : True
HostId : 00000000-0000-0000-0000-000000000000
ProvisioningTime : 7/25/2019 8:34:16 PM
ProvisioningState : Succeeded
Sku :
Name : ESv3-Type1
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg01/providers/Microsoft.Compute/hostGroups/myhostgroup01/hosts/myhost01
Name : myhost01
Location : eastus
Tags : {"key1":"val2"}
This command updates the given Sku of a host.
Parameters
-AutoReplaceOnFailure
Specifies whether the host should be replaced automatically in case of a failure.
Parameter properties
| Type: | Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-HostGroupName
Name of the Host Group.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-LicenseType
Specifies the software license type that will be applied to the VMs deployed on the host. Possible values are: None, Windows_Server_Hybrid, and Windows_Server_Perpetual. Default value is None.
Parameter properties
| Type: | DedicatedHostLicenseTypes |
| Default value: | None |
| Accepted values: | None, WindowsServerHybrid, WindowsServerPerpetual |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
Specifies the name of the Host to be updated.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | HostName |
Parameter sets
-Redeploy
Redeploy the dedicated host. The operation will complete successfully once the dedicated host has migrated to a new node and is running. To determine the health of VMs deployed on the dedicated host after the redeploy check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ResourceGroupName
The name of the resource group.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ResourceId
Resource Id of the Host to be updated.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Sku
The Sku Name that needs to be updated.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
String
Outputs
PSHost
Azure PowerShell
Feedback
Was this page helpful?
