Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save PlagueHO/bef0987d8399095a29c073d8e22f4b23 to your computer and use it in GitHub Desktop.
Save PlagueHO/bef0987d8399095a29c073d8e22f4b23 to your computer and use it in GitHub Desktop.
Get All Scheduled Maintenance Events for an Azure VM using the Azure Metadata Service
Invoke-RestMethod `
-Method GET `
-Uri 'http://169.254.169.254/metadata/scheduledevents?api-version=2017-11-01' `
-UseBasicParsing `
-Headers @{ 'Metadata' = 'true' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment