if you do a
$subscription = Get-AzureRmSubscription -SubscriptionId $subscriptionId
after the login, no matter what you specify, it will take the default subscription ID associated with the account, ignoring the parameter which has been passed.
You can workaround that problem by using
$subscription = Select-AzureRmSubscription -SubscriptionId $subscriptionId
if you do a $subscription = Get-AzureRmSubscription -SubscriptionId $subscriptionId
after the login, no matter what you specify, it will take the default subscription ID associated with the account, ignoring the parameter which has been passed.
You can workaround that problem by using $subscription = Select-AzureRmSubscription -SubscriptionId $subscriptionId