Skip to content

Commit 4b1a4dd

Browse files
committed
Add Support for multiple Registrations
1 parent 72147c9 commit 4b1a4dd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Syndication/AzureStack.MarketplaceSyndication.psm1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,13 @@ function Sync-AzSOfflineMarketplaceItem{
3838
$resources=Get-AzureRmResource
3939
$resource=$resources.resourcename
4040
$registrations=$resource|where-object {$_ -like "AzureStack*"}
41-
$registration = $registrations[0]
41+
if ($registrations.count -gt 1) {
42+
$Registration = $registrations[0]
43+
}
44+
else {
45+
$Registration = $registrations
46+
}
47+
4248

4349
# Retrieve the access token
4450
$tokens = [Microsoft.Azure.Commands.Common.Authentication.AzureSession]::Instance.TokenCache.ReadItems()

0 commit comments

Comments
 (0)