Skip to content

Commit

Permalink
update features statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
sebassem committed Oct 9, 2023
1 parent 0c66e62 commit 4e819e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scripts/Invoke-RegisterSubscriptionResourceProviders.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if ($providers.Count -gt 0) {
if ($providerStatus -eq 'NotRegistered') {
Write-Output "`n Registering the '$provider' provider"
if (Register-AzResourceProvider -ProviderNamespace $provider) {
Write-Output "`n The '$provider' has been registered successfully"
Write-Output "`n The registration for provider'$provider' has started successfully"
}
else {
Write-Output "`n The '$provider' provider has not been registered successfully"
Expand Down Expand Up @@ -62,10 +62,10 @@ if ($providers.Count -gt 0) {
# Define variables
$featureStatus = (Get-AzProviderFeature -ListAvailable | Where-Object FeatureName -eq $feature).RegistrationState
# Check if the feature is registered
if ($featureStatus -eq 'NotRegistered') {
if ($featureStatus -eq 'NotRegistered' -or $featureStatus -eq 'Unregistered') {
Write-Output "`n Registering the '$feature' feature"
if (Register-AzProviderFeature -FeatureName $feature -ProviderNamespace $provider) {
Write-Output "`n The '$feature' has been registered successfully"
Write-Output "`n The The registration for feature '$feature' has started successfully"
}
else {
Write-Output "`n The '$feature' feature has not been registered successfully"
Expand Down

0 comments on commit 4e819e1

Please sign in to comment.