Added ESU timestamp

This commit is contained in:
Alexander (Sasha) Nosov
2023-07-11 14:51:36 -07:00
parent 10cb0a2cd8
commit 6f74d42939
2 changed files with 2 additions and 1 deletions
@@ -66,7 +66,7 @@ The following command will scan resource group `<resource_group_name>` in the su
## Example 4
The following command will set License Type to 'Paid" and enables ESU on all servers in the subscriptions `<sub_id>` and the resource group `<resource_group_name>`.
```console
.\modify-license-type.ps1 -SubId <sub_id> -ResourceGroup <resource_group_name> -LicenseType Paid -EnableESU Yes -Force
```
@@ -210,6 +210,7 @@ foreach ($sub in $subscriptions){
if ($EnableESU) {
if (($settings["LicenseType"] | select-string "Paid","PAYG") -or ($EnableESU -eq "No")) {
$settings["enableExtendedSecurityUpdates"] = ($EnableESU -eq "Yes")
$settings["esuLastUpdatedTimestamp"] = [DateTime]::UtcNow.ToString((Get-Culture).DateTimeFormat.UniversalSortableDateTimePattern)
$WriteSettings = $true
} else {
write-host "The configured license type does not support ESUs"