Skip to content

Instantly share code, notes, and snippets.

@ljtill
Last active August 4, 2022 19:05
Show Gist options
  • Save ljtill/9d3ed7e1009156f7380f855a4a6bdb34 to your computer and use it in GitHub Desktop.
Save ljtill/9d3ed7e1009156f7380f855a4a6bdb34 to your computer and use it in GitHub Desktop.
Provides the ability to lookup Resource API Versions
param(
[Parameter()]
[string]$Resource
)
process {
$providerNamespace = $resource.Split("/")[0]
$resourceType = $resource.Split("/")[1]
$resourceTypes = (Get-AzResourceProvider -ProviderNamespace $providerNamespace).ResourceTypes
$resourceType = $resourceTypes | Where-Object -FilterScript { $_.ResourceTypeName -eq "$resourceType" }
$resourceType
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment