Get-AzLabServicesLab
API to get labs.
Syntax
Get-AzLabServicesLab
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzLabServicesLab
-Name <String>
[-SubscriptionId <String[]>]
[-ResourceGroupName <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzLabServicesLab
[-Name <String>]
[-SubscriptionId <String[]>]
-LabPlan <LabPlan>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzLabServicesLab
[-SubscriptionId <String[]>]
-ResourceGroupName <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzLabServicesLab
[-SubscriptionId <String[]>]
-ResourceId <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.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LabPlan
To construct, see NOTES section for LABPLAN properties and create a hash table.
Type: | LabPlan |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
The ID of the target subscription.
Type: | String[] |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |