다음을 통해 공유


Get-AzureVM

Get-AzureVM

Gets the properties of a virtual machine.

Syntax

Parameter Set: GetVirtualMachineInResourceGroupParamSet
Get-AzureVM [-ResourceGroupName] <System.String> [-Name] <System.String> [[-Status]] [-Profile <Microsoft.Azure.Common.Authentication.Models.AzureProfile> ] [ <CommonParameters>]

Parameter Set: ListAllVirtualMachinesParamSet
Get-AzureVM [-Profile <Microsoft.Azure.Common.Authentication.Models.AzureProfile> ] [ <CommonParameters>]

Parameter Set: ListNextLinkVirtualMachinesParamSet
Get-AzureVM [-NextLink] <System.Uri> [-Profile <Microsoft.Azure.Common.Authentication.Models.AzureProfile> ] [ <CommonParameters>]

Parameter Set: ListVirtualMachineInResourceGroupParamSet
Get-AzureVM [-ResourceGroupName] <System.String> [-Profile <Microsoft.Azure.Common.Authentication.Models.AzureProfile> ] [ <CommonParameters>]

Detailed Description

The Get-AzureVM cmdlet gets the model view and instance view of an Azure virtual machine. The model view is the user specified properties of the virtual machine. The instance view is the instance level status of the virtual machine. To get only the instance view of a virtual machine, specify the Status parameter.

Parameters

-Name<System.String>

Specifies the name of the virtual machine to get.

Aliases

ResourceName,VMName

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-NextLink<System.Uri>

Specifies the next link.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-Profile<Microsoft.Azure.Common.Authentication.Models.AzureProfile>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ResourceGroupName<System.String>

Specifies the name of a resource group.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-Status

Indicates that this cmdlet gets only the instance view of the virtual machine.

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Get model and instance view properties

This command gets the model view and instance view properties of the virtual machine named VirtualMachine07.

Get-AzureVM -ResourceGroupName "ResourceGroup11" -Name "VirtualMachine07"

Example 2: Get instance view properties

This command gets properties of the virtual machine named VirtualMachine07. This command specifies the Status parameter. Therefore, the command gets only the instance view properties.

Get-AzureVM -ResourceGroupName "ResourceGroup11" -Name "VirtualMachine07" -Status

Example 3: Get properties for all virtual machines in a resource group

This command gets properties for all the virtual machines in the resource group named ResourceGroup11.

 Get-AzureVM -ResourceGroupName "ResourceGroup11"

Example 4: Get all virtual machines in your subscription

This command gets all the virtual machines in your subscription.

Get-AzureVM

New-AzureVM

Remove-AzureVM

Restart-AzureVM

Start-AzureVM

Stop-AzureVM

Update-AzureVM