Get-AzLabServicesLab
API to get labs.
Syntax
ListBySubscription (Default)
Get-AzLabServicesLab
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ListByLabName
Get-AzLabServicesLab
-Name <String>
[-SubscriptionId <String[]>]
[-ResourceGroupName <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
LabPlan
Get-AzLabServicesLab
-LabPlan <LabPlan>
[-Name <String>]
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ListByResourceGroup
Get-AzLabServicesLab
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ResourceId
Get-AzLabServicesLab
-ResourceId <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
API to get labs.
Examples
Example 1: Get all labs
Get-AzLabServicesLab
Location Name Type
-------- ---- ----
westus2 Lab1 Microsoft.LabServices/labs
westus2 Lab2 Microsoft.LabServices/labs
westus2 Lab3 Microsoft.LabServices/labs
westus2 Lab4 Microsoft.LabServices/labs
Returns all labs for the current subscription.
Example 2: Get a specific lab
Get-AzLabServicesLab -ResourceGroupName 'yourgroupname' -Name 'yourlabname'
Location Name Type
-------- ---- ----
westus2 yourlabName Microsoft.LabServices/labs
Get a specific lab using the resource group name and the lab name.
Example 3: Get all labs created with a lab plan
$plan = Get-AzLabServicesLabPlan -LabPlanName 'lab plan name'
$plan | Get-AzLabServicesLab -Name 'lab name'
Location Name Type
-------- ---- ----
westus2 lab Name Microsoft.LabServices/labs
Get the specific lab in a lab plan using the lab plan object and the lab name.
Example 4: Get labs using wildcards in the lab name.
Get-AzLabServicesLab -ResourceGroupName 'group name' -Name '*lab name'
Location Name Type
-------- ---- ----
westus2 yourlab Name Microsoft.LabServices/labs
westus2 anotherlab Name Microsoft.LabServices/labs
Using the Name parameter and a wildcard all labs in the resource group like the name are returned.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
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 |
-LabPlan
To construct, see NOTES section for LABPLAN properties and create a hash table.
Parameter properties
Type: | LabPlan |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
LabPlan
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
API to get labs.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ListByLabName
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ResourceGroupName
API to get labs.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ListByLabName
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ResourceId
API to get labs.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ResourceId
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 |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
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.