Reply
Get all subscriptions recursive from management groups with PowerShell
$topLvlMgmtGrp = "CHANGETHIS" # Name of the top level management group
$subscriptions = @() # Output array
# Collect data from managementgroups
$mgmtGroups = Get-AzManagementGroup -GroupId $topLvlMgmtGrp -Expand -Recurse
$children = $true
while ($children) {
$children = $false
$firstrun = $true
foreach ($entry in $mgmtGroups) {
if ($firstrun) {Clear-Variable mgmtGroups ; $firstrun = $false}
if ($entry.Children.length -gt 0) {
# Add management group to data that is being looped throught
$children = $true
$mgmtGroups += $entry.Children
}
else {
# Add subscription to output object
$subscriptions += New-Object -TypeName psobject -Property ([ordered]@{'DisplayName'=$entry.DisplayName;'SubscriptionID'=$entry.Name})
}
}
}
$subscriptions

The priority of parameters for Bicep
Enable setting for controlling power setting on lock display/screen
Powershell output to file, ensure encoding is correct
Instead of using out-file, use the method Set-Content
This give the possibility to use the parameter: “-Encoding“
Download large file with curl to test speed
Get Public IP with curl
curl ifconfig.me
Decode access tokens to see data
Measure Azure Latency
Create site for checking out, what the latency is to the Azure datacenters
Force cancelation of subscription in Azure with REST call
Normally you can only cancel/disable a subscription by code if the subscription is empty.
If you add IgnoreResourceCheck=true and thereby still cancel the subscription. This give you the grace time before deletion. Remember to change {subscriptionId} in the URI
Documentation on grace period



