Edit

Share via


Get-AzLabServicesVM

Returns the properties for a lab virtual machine.

Syntax

List (Default)

Get-AzLabServicesVM
    -LabName <String>
    -ResourceGroupName <String>
    [-SubscriptionId <String[]>]
    [-Filter <String>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Get

Get-AzLabServicesVM
    -LabName <String>
    -Name <String>
    -ResourceGroupName <String>
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Lab

Get-AzLabServicesVM
    -Lab <Lab>
    [-Name <String>]
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Description

Returns the properties for a lab virtual machine.

Examples

Example 1: Gets all the Virtual machines in the lab.

Get-AzLabServicesVM -LabName "Lab Name" -ResourceGroupName "Group Name"
Name
----
0
1
2

Returns all the VMs.

Example 2: Gets the specific VM in the lab.

Get-AzLabServicesVM -LabName "Lab Name" -ResourceGroupName "Group Name" -Name 2
Name
----
2

Returns the specific VM.

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

-Filter

The filter to apply to the operation.

Parameter properties

Type:String
Default value:None
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

-Lab

To construct, see NOTES section for LAB properties and create a hash table.

Parameter properties

Type:Lab
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Lab
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-LabName

The name of the lab that uniquely identifies it within containing lab account. Used in resource URIs.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

List
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

The ID of the virtual machine that uniquely identifies it within the containing lab. Used in resource URIs.

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

List
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Get
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.

Parameter properties

Type:

String[]

Default value:(Get-AzContext).Subscription.Id
Supports wildcards:False
DontShow:False

Parameter sets

(All)
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.

Inputs

Lab

Outputs

IVirtualMachine