Written for WS-050 but also applicable to other courses using the sponsored trials.
Register-AzResourceProvider -ProviderNameSpace "Microsoft.Compute"
# I suggest you run the following now, to save time in later exercises.
Register-AzResourceProvider -ProviderNamespace Microsoft.DataMigration
#$Location = "West Central US"
#$Location = "Australia East"
$Location = "West US 2"
#$Location = "Central US"
Get-AzVMUsage -Location $Location `
| Select-Object @{l="ResourceType";e={$PSItem.Name.LocalizedValue}}, CurrentValue, Limit `
| Where-Object { $PSItem.ResourceType -in "Standard DSv3 Family vCPUs", "Standard DSv5 Family vCPUs", "Standard FSv2 Family vCPUs", "Total Regional vCPUs" }
| Where-Object { ($PSItem.Family -in "standardDSv3Family", "standardDSv5Family", "standardFSv2Family" ) -and ( $PSItem.ResourceType -eq "virtualMachines" ) } `
| ft Name, Family, @{l="Restriction";e={$PSItem.Restrictions.ReasonCode -join ", "}}