Created
November 24, 2022 17:09
-
-
Save oliverlabs/abcaa4fbc1f39c4bc781a4edd48f8e28 to your computer and use it in GitHub Desktop.
Check if an Azure Feature is registered for a subscription
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Output "Verifying required Resource Providers Features are registered" | |
$featureName='EnableOIDCIssuerPreview' | |
$aksfeature = az feature list --query "[?contains(name, '$featureName')]" -o json | |
Write-Output "-- $featureName" | |
$feature = $aksfeature | Convertfrom-Json | |
$feature.properties.state | |
if ($feature.properties.state -ne 'Registered') { | |
Write-Output $feature | |
Write-Error "$featureName NOT registered" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment