Get-AzVMExtension
Gets properties of Virtual Machine Extensions installed on a virtual machine.
Get-AzVMExtension
[-ResourceGroupName] <String>
[-VMName] <String>
[[-Name] <String>]
[-Status]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzVMExtension
[-Status]
[-VMObject <PSVirtualMachine>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzVMExtension
[-Status]
[-ResourceId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
The Get-AzVMExtension cmdlet gets properties of Virtual Machine Extensions installed on a virtual machine. Specify the name of an extension for which to get properties. To get only the instance view of an extension, specify the Status parameter.
Get-AzVMExtension -ResourceGroupName "ResourceGroup11" -VMName "VirtualMachine22" -Name "CustomScriptExtension"
ResourceGroupName : ResourceGroup11
VMName : VirtualMachine22
Name : CustomScriptExtension
Location : eastus
Etag : null
Publisher : Microsoft.Azure.Extensions
ExtensionType : CustomScript
TypeHandlerVersion : 2.0
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup11
/providers/Microsoft.Compute/virtualMachines/VirtualMachine22/extensions/CustomScriptExtension
PublicSettings : {}
ProtectedSettings :
ProvisioningState : Succeeded
Statuses :
SubStatuses :
AutoUpgradeMinorVersion : True
ForceUpdateTag :
This command gets properties for the extension named CustomScriptExtension on the virtual machine named VirtualMachine22 in the resource group ResourceGroup11.
Get-AzVMExtension -ResourceGroupName "ResourceGroup11" -VMName "VirtualMachine22" -Name "CustomScriptExtension" -Status
ResourceGroupName : ResourceGroup11
VMName : VirtualMachine22
Name : CustomScriptExtension
Location : eastus
Etag : null
Publisher : Microsoft.Azure.Extensions
ExtensionType : CustomScript
TypeHandlerVersion : 2.0
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup11
/providers/Microsoft.Compute/virtualMachines/VirtualMachine22/extensions/CustomScriptExtension
PublicSettings : {}
ProtectedSettings :
ProvisioningState : Succeeded
Statuses : {Microsoft.Azure.Management.Compute.Models.InstanceViewStatus}
SubStatuses :
AutoUpgradeMinorVersion : True
ForceUpdateTag :
This command gets the instance view for the extension named CustomScriptExtension on the virtual machine named VirtualMachine22 in the resource group ResourceGroup11.
Get-AzVMExtension -ResourceGroupName "ResourceGroup11" -VMName "VirtualMachine22"
ResourceGroupName : ResourceGroup11
VMName : VirtualMachine22
Name : CustomScriptExtension
Location : eastus
Etag : null
Publisher : Microsoft.Azure.Extensions
ExtensionType : CustomScript
TypeHandlerVersion : 2.0
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup11
/providers/Microsoft.Compute/virtualMachines/VirtualMachine22/extensions/CustomScriptExtension
PublicSettings : {}
ProtectedSettings :
ProvisioningState : Succeeded
Statuses :
SubStatuses :
AutoUpgradeMinorVersion : True
ForceUpdateTag :
$vm = Get-AzVM -ResourceGroupName "ResourceGroup11" -Name "VirtualMachine22"
Get-AzVMExtension -VMObject $vm
ResourceGroupName : ResourceGroup11
VMName : VirtualMachine22
Name : CustomScriptExtension
Location : eastus
Etag : null
Publisher : Microsoft.Azure.Extensions
ExtensionType : CustomScript
TypeHandlerVersion : 2.0
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup11
/providers/Microsoft.Compute/virtualMachines/VirtualMachine22/extensions/CustomScriptExtension
PublicSettings : {}
ProtectedSettings :
ProvisioningState : Succeeded
Statuses :
SubStatuses :
AutoUpgradeMinorVersion : True
ForceUpdateTag :
This command gets the list of extensions installed on the virtual machine named VirtualMachine22 in the resource group ResourceGroup11.
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the name of an extension. This cmdlet gets properties for the extension that this parameter specifies.
Type: | String |
Aliases: | ExtensionName |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of a resource group.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Resource Id specifying the virtual machine object the extension is on.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Indicates that this cmdlet gets only the instance view of an extension.
Type: | SwitchParameter |
Position: | 3 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of a virtual machine. This cmdlet gets properties of an extension from the virtual machine that this parameter specifies.
Type: | String |
Aliases: | ResourceName |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the virtual machine object the extension is on.
Type: | PSVirtualMachine |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Azure PowerShell feedback
Azure PowerShell is an open source project. Select a link to provide feedback: