Skip to content

Commit 26a6697

Browse files
author
Alexander (Sasha) Nosov
committed
Fixed tag support error
1 parent 188848c commit 26a6697

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

samples/manage/azure-hybrid-benefit/modify-license-type/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ ms.date: 06/21/2025
1818

1919
05/13/2025 - Modified to fix errors and to remove the auto-start of the offline resources.
2020

21+
05/30/2025 - Added transcript support
22+
2123

2224
# Overview
2325

samples/manage/azure-hybrid-benefit/modify-license-type/modify-azure-sql-license-type.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
.VERSION
1818
1.0.0 - Initial version.
1919
1.0.2 - Modified to fix errors and to remove the auto-start of the offline resources.
20+
1.0.3 - Added transcript.
2021
2122
.PARAMETER SubId
2223
A single subscription ID or a CSV file name containing a list of subscriptions.
@@ -431,7 +432,7 @@ foreach ($sub in $subscriptions) {
431432
if ($tagsFilter -and $filterAdded) {
432433
$serverQuery += "$tagsFilter"
433434
} elseif ($tagsFilter) {
434-
$serverQuery += "?1==1$tagsFilter" # A trick to make the tags filter work when it's the only filter
435+
$serverQuery += "?type=='Microsoft.Sql/servers'$tagsFilter" # A trick to make the tags filter work when it's the only filter
435436
}
436437

437438
$serverQuery += "]"
@@ -484,7 +485,7 @@ foreach ($sub in $subscriptions) {
484485

485486
# Add tags filter if specified
486487
if ($tagsFilter) {
487-
$dbQuery += " $tagsFilter"
488+
$dbQuery += "$tagsFilter"
488489
}
489490

490491
$dbQuery += "].{name:name, licenseType:licenseType, location:location, resourceGroup:resourceGroup, id:id, ResourceType:type, State:status}"

0 commit comments

Comments
 (0)