Skip to content

Commit 5fa2efb

Browse files
author
Lauren Dunlap
committed
add lab inventory option in resource graph
1 parent 497a84f commit 5fa2efb

File tree

1 file changed

+43
-2
lines changed

1 file changed

+43
-2
lines changed

articles/lab-services/find-delete-lab-resources.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Find and delete lab resources
33
description: Learn about finding and deleting Azure Lab Services lab resources.
44
ms.topic: how-to
5-
ms.date: 11/25/2024
5+
ms.date: 12/5/2024
66

77
# customer intent: As an Azure Lab Services customer, I want to understand how to find and delete lab resources, as well as determine which version of Azure Lab Services is deployed whether lab accounts (older version) or lab plans (newer version).
88
---
@@ -13,8 +13,49 @@ ms.date: 11/25/2024
1313

1414
There are two versions of Azure Lab Services. Labs created from lab accounts use the older version, while labs created from lab plans use the newer version. This guide explains how to review lab resources, determine lab version, and delete unused resources.
1515

16+
## Review labs
17+
A lab inventory can be found in the Azure Portal under [Labs - Microsoft Azure](https://ms.portal.azure.com/#browse/Microsoft.LabServices%2Flabs).
18+
* Browse and manage deployed lab resources
19+
* Review each lab's region, OS, and number of lab VMs in use
20+
21+
Additional lab configurations or queries across multiple subscriptions can be surfaced with [Azure Resource Graph Explorer](azure/governance/resource-graph/overview). These attributes help optimize resources, plan for service retirement, and transition to a preferred lab solution.
22+
23+
* **Name** - Identifies lab name
24+
* **Location** - Indicates the deployed region, which can impact compliance requirements and latency
25+
* **State** - Shows the lab template status e.g. published, helping to track lab development stage
26+
* **labPlanId** - Determine the lab version, with an empty value indicating a lab account-based lab
27+
* **osType** - Specifies the operating system (Windows or Linux), important for sofware compatibility and licensing
28+
* **Capacity** - Indicates the number of lab VMs, useful for resource allocation and scaling decisions
29+
* **SKU** - Shows the compute option associated with the lab VM size, impacting performance and cost
30+
* **Image** - Identifies whether an Azure Compute Gallery (id) or Azure Marketplace (publisher) image was used, which affects image updates and opportunity for reuse
31+
* **Network** - Surfaces a custom network configuration for labs with advanced networking
32+
* **createdAt** - Provides the resource creation timestamp, useful for tracking the age and lifecycle of the lab
33+
* **lastModifiedAt** - Shows the most recent modification timestamp, helping to determine recent activity
34+
* **lastModifiedBy** - Indicates the user or application that most recently modified the resource, important for auditing and accountability
35+
36+
In the Azure Portal at [Labs - Microsoft Azure](https://ms.portal.azure.com/#browse/Microsoft.LabServices%2Flabs), select 'Open query' and replace existing query with:
37+
38+
```kusto
39+
resources
40+
| where type == 'microsoft.labservices/labs' or type== 'microsoft.labservices/labaccounts/labs' and isnotempty(systemData)
41+
| extend sku = properties.virtualMachineProfile.sku.name
42+
| extend image = tostring(properties.virtualMachineProfile.imageReference)
43+
| extend network = tostring(properties.networkProfile)
44+
| extend state = tostring(properties.state)
45+
| extend labPlanId = tostring(properties.labPlanId)
46+
| extend osType = tostring(properties.virtualMachineProfile.osType)
47+
| extend capacity1 = properties.virtualMachineProfile.sku.capacity
48+
| extend capacity = case(isnull(capacity1), "0 machines", capacity1 == 1, "1 machine", strcat(tostring(capacity1), " machines"))
49+
| extend lastModifiedAt = tostring(systemData.lastModifiedAt)
50+
| extend lastModifiedBy = tostring(systemData.lastModifiedBy)
51+
| extend createdAt = tostring(systemData.createdAt)
52+
| project id, subscriptionId, resourceGroup, location, state, labPlanId, osType, capacity, sku, image, network, createdAt, lastModifiedAt, lastModifiedBy, tags
53+
54+
```
55+
56+
1657
## Find lab version
17-
There are two versions of Azure Lab Services. Lab accounts are the older version, while lab plans are the newer version with enhanced feature. Use lab plans for improved student experience and supportability. Follow these steps to identify which lab version is currently deployed.
58+
There are two versions of Azure Lab Services. Lab accounts are the older version, while lab plans are the newer version with enhanced feature. Use lab plans for improved student experience and supportability. [Review all labs together](find-delete-lab-resources#review-labs) or follow these steps to identify which lab version is currently deployed.
1859

1960
* [Find lab accounts](how-to-manage-lab-accounts.md#view-lab-accounts): In the [Azure portal](https://portal.azure.com/) search box, enter lab account, and then select Lab accounts. Labs created from lab accounts use the older version.
2061

0 commit comments

Comments
 (0)