This repository has been created to collect the required material to set up DevTest Labs in Univerisities. This is useful both for IT admin and students because the former won't have to maintain physical machines, the latter will always have fresh machines available both for classes and self-service usage.
This folder contains three useful files:
- A video for a complete demo about setting up an entire environment on Azure DevTest Lab, in italian
- A video for a complete demo about setting up an entire environment on Azure DevTest Lab, in english
- A complete manual which describes the solution implemented and how to deploy the Azure DevTest Lab for both class and self-service scenario
- An excel which helps in calculate an estimate of the price to run the solution
This folder contains:
-
- Add-AzureDtlVM: This script adds the specified number of Azure virtual machines to a DevTest Lab.
- Add-AzureDtlVMAutoVar: This script adds the number of Azure virtual machines in the DevTest Lab by reading some parameters from AutomationVariable.
- Add-GroupPermissionsDevTestLab: This script adds the specified role to the AD Group in the DevTest Lab.
- Common: This script contains many useful functions for the other scripts.
- DeallocateStoppedVM: This script deallocates every stopped Azure virtual machines.
- Manage-AzureDtlFixedPool: This script guarantees that the Virtual Machine pool of the Lab equals to the PoolSize specified as Azure Tag of Lab.
- Remove-AzureDtlLabVMs: This script guarantees that the Virtual Machine pool of the Lab equals to the PoolSize specified as Azure Tag of Lab.
- Remove-AzureDtlVM: This script deletes every Azure virtual machines in the DevTest Lab.
- Remove-GroupPermissionsDevTestLab: This script removes the specified role from the AD Group in the DevTest Lab.
- Test-AzureDtlVMs: Given LabName and LabSize, this script verifies how many Azure virtual machines are inside the DevTest Lab and throws an error inside the logs when the number is greater or lower than size +/- VMDelta.
-
- LoadIdleScript: This script creates a task inside Windows Task Scheduler getting a file script from a blob storage.
- ShutdownOnIdleV2: This script shutdowns the machine if the user hasn't been active.
In 'powershell' do the following:
Login-AzureRmAccount
Set-AzureRmContext -SubscriptionId "XXXXX-XXXX-XXXX"
Save-AzureRMProfile -Path "$env:APPDATA\AzProfile.txt"
This saves the credentials file in the location on disk where the script look for by default.