Set-AzStackHCI

Set-AzStackHCI modifies resource properties of the Microsoft.AzureStackHCI cloud resource representing the on-premises cluster to enable or disable features.

Syntax

Set-AzStackHCI
   [[-ComputerName] <String>]
   [-Credential <PSCredential>]
   [-ResourceId <String>]
   [-EnableWSSubscription <Boolean>]
   [-DiagnosticLevel <DiagnosticLevel>]
   [-TenantId <String>]
   [-ArmAccessToken <String>]
   [-AccountId <String>]
   [-EnvironmentName <String>]
   [-UseDeviceAuthentication]
   [-Force]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Set-AzStackHCI modifies resource properties of the Microsoft.AzureStackHCI cloud resource representing the on-premises cluster to enable or disable features.

Examples

Example 1:

Set-AzStackHCI -EnableWSSubscription $true

Result: Success

Invoking on one of the cluster node to enable Windows Server Subscription feature

Example 2:

Set-AzStackHCI -ComputerName ClusterNode1 -DiagnosticLevel Basic

Result: Success

Invoking from the management node to set the diagnostic level to Basic

Parameters

-AccountId

Specifies the ARM access token. Specifying this along with ArmAccessToken will avoid Azure interactive logon.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ArmAccessToken

Specifies the ARM access token. Specifying this along with AccountId will avoid Azure interactive logon.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ComputerName

Specifies one of the cluster node in on-premise cluster that is registered to Azure.

Type:String
Position:1
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Credential

Specifies the credential for the ComputerName. Default is the current user executing the Cmdlet.

Type:PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DiagnosticLevel

Specifies the diagnostic level for the cluster.

Type:DiagnosticLevel
Accepted values:Off, Basic, Enhanced
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnableWSSubscription

Specifies if Windows Server Subscription should be enabled or disabled. Enabling this feature starts billing through your Azure subscription for Windows Server guest licenses.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnvironmentName

Specifies the Azure Environment. Default is AzureCloud. Valid values are AzureCloud, AzureChinaCloud, AzurePPE, AzureCanary, AzureUSGovernment

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

Specifies the fully qualified resource ID, including the subscription, as in the following example: /Subscriptions/subscription ID/providers/Microsoft.AzureStackHCI/clusters/MyCluster

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TenantId

Specifies the Azure TenantId.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UseDeviceAuthentication

Use device code authentication instead of an interactive browser prompt.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

PSObject