Remove-AzVmss
Removes the VMSS or a virtual machine that is within the VMSS.
構文
Default (既定)
Remove-AzVmss
[-ResourceGroupName] <String>
[-VMScaleSetName] <String>
[[-InstanceId] <String[]>]
[-ForceDeletion <Boolean>]
[-Force]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
説明
The Remove-AzVmss cmdlet removes the Virtual Machine Scale Set (VMSS) from Azure.
This cmdlet can also be used to remove a specific virtual machine inside the VMSS.
You can use the InstanceId parameter to remove a specific virtual machine inside the VMSS.
例
Example 1: Remove a VMSS
Remove-AzVmss -ResourceGroupName "Group001" -VMScaleSetName "VMScaleSet001"
This command removes the VMSS named VMScaleSet001 that belongs to the resource group named Group001.
Example 2: Remove a virtual machine from within a VMSS
Remove-AzVmss -ResourceGroupName "Group002" -VMScaleSetName "VMScaleSet002" -InstanceId "3";
This command removes the virtual machine with instance ID 3 from the VMSS named VMScaleSet002 that belongs to the resource group named Group002.
パラメーター
-AsJob
Run cmdlet in the background and return a Job to track progress.
パラメーターのプロパティ
パラメーター セット
(All)
配置: Named
必須: False
パイプラインからの値: False
プロパティ名別のパイプラインからの値: False
残りの引数からの値: False
-Confirm
Prompts you for confirmation before running the cmdlet.
パラメーターのプロパティ
パラメーター セット
(All)
配置: Named
必須: False
パイプラインからの値: False
プロパティ名別のパイプラインからの値: False
残りの引数からの値: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
パラメーターのプロパティ
型: IAzureContextContainer
規定値: None
ワイルドカードのサポート: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
パラメーター セット
(All)
配置: Named
必須: False
パイプラインからの値: False
プロパティ名別のパイプラインからの値: False
残りの引数からの値: False
-Force
Forces the command to run without asking for user confirmation.
パラメーターのプロパティ
パラメーター セット
(All)
配置: Named
必須: False
パイプラインからの値: False
プロパティ名別のパイプラインからの値: False
残りの引数からの値: False
-ForceDeletion
Optional parameter to force delete a VM.
パラメーターのプロパティ
パラメーター セット
(All)
配置: Named
必須: False
パイプラインからの値: False
プロパティ名別のパイプラインからの値: False
残りの引数からの値: False
-InstanceId
Specifies, as a string array, the ID of the instances that need to be started.
For instance: -InstanceId "0", "3"
パラメーターのプロパティ
型: String [ ]
規定値: None
ワイルドカードのサポート: False
DontShow: False
パラメーター セット
(All)
配置: 2
必須: False
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
-ResourceGroupName
Specifies the name of the resource group that the VMSS belongs to.
パラメーターのプロパティ
型: String
規定値: None
ワイルドカードのサポート: False
DontShow: False
パラメーター セット
(All)
配置: 0
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
-VMScaleSetName
Species the name of the VMSS that this cmdlet removes.
If you specify the InstanceId parameter, the cmdlet will remove the specified virtual machine from the VMSS named by this parameter.
パラメーターのプロパティ
型: String
規定値: None
ワイルドカードのサポート: False
DontShow: False
Aliases: Name
パラメーター セット
(All)
配置: 1
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
パラメーターのプロパティ
パラメーター セット
(All)
配置: Named
必須: False
パイプラインからの値: False
プロパティ名別のパイプラインからの値: False
残りの引数からの値: False
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 .
出力