Skip to content

Commit f90c6d5

Browse files
authored
Merge pull request MicrosoftDocs#94243 from spelluru/labps1031
Az.LabServices module
2 parents bbb6bbc + 6944c47 commit f90c6d5

File tree

4 files changed

+57
-4
lines changed

4 files changed

+57
-4
lines changed

articles/lab-services/classroom-labs/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@
8282
items:
8383
- name: REST API
8484
href: https://docs.microsoft.com/rest/api/labservices/
85+
- name: Az.LabServices PowerShell module (preview)
86+
href: reference-powershell-module.md
8587
- name: Resources
8688
items:
8789
- name: Azure updates

articles/lab-services/classroom-labs/how-to-manage-classroom-labs.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ To set up a classroom lab in a lab account, you must be a member of the **Lab Cr
2424

2525
## Create a classroom lab
2626

27-
1. Navigate to [Azure Lab Services website](https://labs.azure.com). Note that Internet Explorer 11 is not supported yet.
27+
1. Navigate to [Azure Lab Services website](https://labs.azure.com). Internet Explorer 11 is not supported yet.
2828
2. Select **Sign in** and enter your credentials. Select or enter a **user ID** that is a member of the **Lab Creator** role in the lab account, and enter password. Azure Lab Services supports organizational accounts and Microsoft accounts.
2929
3. Select **New lab**.
3030

@@ -119,8 +119,10 @@ To switch to another classroom lab from the current, select the drop-down list o
119119

120120
You can also create a new lab using the **New lab** in this drop-down list.
121121

122-
To switch to a different lab account, select the drop-down next to the lab account and select the other lab account.
122+
> [!NOTE]
123+
> You can also use the Az.LabServices PowerShell module (preview) to manage labs. For more information, see the [Az.LabServices home page on GitHub](https://github.com/Azure/azure-devtestlab/tree/master/samples/ClassroomLabs/Modules/Library).
123124
125+
To switch to a different lab account, select the drop-down next to the lab account and select the other lab account.
124126

125127
## Next steps
126128
See the following articles:

articles/lab-services/classroom-labs/how-to-manage-lab-accounts.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.workload: na
1212
ms.tgt_pltfrm: na
1313
ms.devlang: na
1414
ms.topic: article
15-
ms.date: 05/07/2019
15+
ms.date: 10/31/2019
1616
ms.author: spelluru
1717

1818
---
@@ -23,7 +23,7 @@ In Azure Lab Services, a lab account is a container for managed lab types such a
2323
The following steps illustrate how to use the Azure portal to create a lab account with Azure Lab Services.
2424

2525
1. Sign in to the [Azure portal](https://portal.azure.com).
26-
2. Select **All Services** on the left menu. Select **Lab Accounts** in the **DEVOPS** section. If you select star (`*`) next to **Lab Accounts**, it's added to the **FAVORITES** section on the left menu. From the next time onwards, you select **Lab Accounts** under **FAVORITES**.
26+
2. Select **All Services** on the left menu. Select **Lab Accounts** in the **DevOps** section. If you select star (`*`) next to **Lab Accounts**, it's added to the **FAVORITES** section on the left menu. From the next time onwards, you select **Lab Accounts** under **FAVORITES**.
2727

2828
![All Services -> Lab Accounts](../media/tutorial-setup-lab-account/select-lab-accounts-service.png)
2929
3. On the **Lab Accounts** page, select **Add** on the toolbar.
@@ -92,6 +92,8 @@ Follow instructions from the previous section that displays lab accounts in a li
9292

9393
![Delete lab account - confirmation](../media/how-to-manage-lab-accounts/delete-lab-account-confirmation.png)
9494

95+
> [!NOTE]
96+
> You can also use the Az.LabServices PowerShell module (preview) to manage lab accounts. For more information, see the [Az.LabServices home page on GitHub](https://github.com/Azure/azure-devtestlab/tree/master/samples/ClassroomLabs/Modules/Library).
9597
9698
## Next steps
9799
See the following article: [How to configure lab accounts](how-to-configure-lab-accounts.md).
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: PowerShell module for Azure Lab Services | Microsoft Docs
3+
description: This article provides information about a PowerShell module that helps with managing artifacts in Azure Lab Services.
4+
services: lab-services
5+
documentationcenter: na
6+
author: spelluru
7+
manager:
8+
editor: ''
9+
10+
ms.service: lab-services
11+
ms.workload: na
12+
ms.tgt_pltfrm: na
13+
ms.devlang: na
14+
ms.topic: article
15+
ms.date: 11/01/2019
16+
ms.author: spelluru
17+
18+
---
19+
# Az.LabServices PowerShell module (preview)
20+
Az.LabServices is a PowerShell module that simplifies the management of Azure Lab services. It provides composable functions to create, query, update and delete lab accounts, labs, VMs, and Images. For more information about this module, see the [Az.LabServices home page on GitHub](https://github.com/Azure/azure-devtestlab/tree/master/samples/ClassroomLabs/Modules/Library).
21+
22+
> [!NOTE]
23+
> This module is in **preview**.
24+
25+
## Example command
26+
Here is an example of using a PowerShell command to stop all the running VMs in all labs.
27+
28+
```powershell
29+
Get-AzLabAccount | Get-AzLab | Get-AzLabVm -Status Running | Stop-AzLabVm
30+
```
31+
32+
## Get started
33+
1. Install [Azure PowerShell](https://docs.microsoft.com/powershell/azure/overview) if it doesn't exist on your machine.
34+
2. Download [Az.LabServices.psm1](https://github.com/Azure/azure-devtestlab/blob/master/samples/ClassroomLabs/Modules/Library/Az.LabServices.psm1) to your machine.
35+
3. Import the module:
36+
37+
```powershell
38+
Import-Module .\Az.LabServices.psm1
39+
```
40+
4. Run the following command to list all the labs in your subscription.
41+
42+
```powershell
43+
Get-AzLabAccount | Get-AzLab
44+
```
45+
46+
## Next steps
47+
See the [Az.LabServices home page on GitHub](https://github.com/Azure/azure-devtestlab/tree/master/samples/ClassroomLabs/Modules/Library).

0 commit comments

Comments
 (0)