File tree Expand file tree Collapse file tree
samples/manage/azure-arc-enabled-sql-server/modify-license-type Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515# -All (Optional. Set the new license type value only if undefined)
1616#
1717# The script uses a function ConvertTo-HashTable that was created by Adam Bertram (@adam-bertram).
18- # The function was originally published in this blog : https://4sysops.com/archives/convert-json-to-a-powershell-hash-table/
18+ # The function was originally published on this site : https://4sysops.com/archives/convert-json-to-a-powershell-hash-table/
1919# and used here with the author's permission.
2020#
2121
@@ -171,13 +171,13 @@ foreach ($sub in $subscriptions){
171171 if ($settings [" LicenseType" ] -ne $LicenseType ) {
172172 $settings [" LicenseType" ] = $LicenseType
173173 Write-Host " Resource group: [$ ( $r.resourceGroup ) ] Connected machine: [$ ( $r.MachineName ) ] : License type: [$ ( $settings [" LicenseType" ]) ]"
174- Set-AzConnectedMachineExtension @setId - Settings $settings - NoWait
174+ Set-AzConnectedMachineExtension @setId - Settings $settings - NoWait | Out-Null
175175 }
176176 }
177177 } else {
178178 $settings [" LicenseType" ] = $LicenseType
179179 Write-Host " Resource group: [$ ( $r.resourceGroup ) ] Connected machine: [$ ( $r.MachineName ) ] : License type: [$ ( $settings [" LicenseType" ]) ]"
180- Set-AzConnectedMachineExtension @setId - Settings $settings | Out-Null
180+ Set-AzConnectedMachineExtension @setId - Settings $settings - NoWait | Out-Null
181181 }
182182 }
183183}
You can’t perform that action at this time.
0 commit comments