Skip to content

Instantly share code, notes, and snippets.

@MrR0bert
MrR0bert / timeapi
Created April 24, 2026 09:21
timeapi-url
https://timeapi.io/api/v1/time/current/zone?timezone=Europe%2FAmsterdam&nocache=7e1d873f-6ee1-4a4b-a16a-15be615f691f
@MrR0bert
MrR0bert / Set-RbkAzVmAutoShutdown.ps1
Created December 2, 2020 10:55
Update a bunch of vms with a shutdown schedule
$azContext = Get-AzContext
$vmCollection = Get-AzVm
$SubscriptionId = $azContext.Subscription.Id
$vmCollection | % {
$rsgName = $_.ResourceGroupName
$vmName = $_.Name
$ScheduledShutdownResourceId = "/subscriptions/$SubscriptionId/resourceGroups/$RSGName/providers/microsoft.devtestlab/schedules/shutdown-computevm-$VMName"
$shutdownSchedule = Get-AzResource -Id $ScheduledShutdownResourceId -ErrorAction SilentlyContinue

Keybase proof

I hereby claim:

To claim this, I am signing this object: