Get-AzNetworkCloudVirtualMachine
Get properties of the provided virtual machine.
Syntax
List (Default)
Get-AzNetworkCloudVirtualMachine
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get
Get-AzNetworkCloudVirtualMachine
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
List1
Get-AzNetworkCloudVirtualMachine
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
GetViaIdentity
Get-AzNetworkCloudVirtualMachine
-InputObject <INetworkCloudIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Description
Get properties of the provided virtual machine.
Examples
Example 1: List virtual machines by subscription
Get-AzNetworkCloudVirtualMachine -SubscriptionId subscriptionId
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType AzureAsyncOperation
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ -
eastus testVM123 07/07/2023 16:50:12 <user> User 07/08/2023 03:19:08 <Identity> A
This command gets all virtual machines under a subscription.
Example 2: Get virtual machine
Get-AzNetworkCloudVirtualMachine -Name vmName -ResourceGroupName resourceGroup -SubscriptionId subscriptionId
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ --------------------------------------------- ------------------------
eastus <VM name> 07/07/2023 16:50:12 <user> User 07/08/2023 03:19:08 <Identity> Application <RG>
This command gets a virtual machine by name.
Example 2: List virtual machines by resource group
Get-AzNetworkCloudVirtualMachine -ResourceGroupName resourceGroup -SubscriptionId subscriptionId
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ --------------------------------------------- ------------------------
eastus <VM name> 07/07/2023 16:50:12 <user> User 07/08/2023 03:19:08 <Identity> Application <RG>
eastus <VM name> 07/07/2023 16:50:12 <user> User 07/08/2023 03:19:08 <Identity> Application <RG>
eastus <VM name> 07/07/2023 16:50:12 <user> User 07/08/2023 03:19:08 <Identity> Application <RG>
This command lists all virtual machines in a resource group.
Parameters
-DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
GetViaIdentity
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The name of the virtual machine.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: VirtualMachineName
Parameter sets
Get
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group.
The name is case insensitive.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Get
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
List1
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
The ID of the target subscription.
The value must be an UUID.
Parameter properties
Type: String [ ]
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
List
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Get
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
List1
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: 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 .
Outputs