I am using Powershell Azure cmdlets to perform some operations on each subscription.
However, all my subscriptions have the same name. So, if I perform an operation like:
$subs | ForEach-Object { Select-AzureSubscription -Current -SubscriptionName $_.SubscriptionName $services = Get-AzureService Write-Output "$($services .Length) services under $($_.SubscriptionId) subscription" }
it always works for the same subscription, since subscriptions differ only in the subscription identifier.
And Select-AzureSubscription has no -SubscriptionId parameter.
Any ideas how I can find a workaround?
source share