Hi guys, the following part of the script is not working for me as the cmdlet is unknown:
Connect-AzureRmAccount -SubscriptionId $subscriptionId
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@jaspervd86, Thanks for bringing this to our attention. Currently investigating and will get back to you shortly.
@jaspervd86, try using Login-AzureRmAccount as a workaround. Will work with the content owner to ensure the doc is updated with the appropriate cmdlet.
Login-AzureRmAccount -SubscriptionId $subscriptionId
@mcollier, I can confirm @jaspervd86's issue that connect-azureRmaccount fails. Also noticed some chatter online about the same. Let me know if it's ok to fix the doc by replacing connect-AzureRmAccount with Login-AzureRmAccount.
@femsulu, I think the use of Connect-AzureRmAccount is correct. Azure PowerShell v5.3.0 (https://docs.microsoft.com/en-us/powershell/azure/release-notes-azureps?view=azurermps-5.7.0#530---february-2018) made this change. Login-AzureRmAccount should now be an alias for Connect-AzureRmAccount. Based on the commit history, it appears @sdwheeler updated several docs on April 19th to make use of Connect-AzureRmAccount.
@mcollier The change to use Connect-AzureRmAccount does not apply to the version of Azure PowerShell used by Azure Stack. The change I made to the docs was an error. I should have excluded the Azure Stack docs. The docs have been changed back to use Add-AzureRmAccount.
@sdwheeler This article isn't about Azure Stack.
@mcollier Sorry, I didn't read the whole thread.
Connect-AzureRmAccount is the correct cmdlet name starting with v5.3.0. For backward compatibility, Connect-AzureRmAccount has the following aliases.
Users that have not upgraded to v5.3.0 or higher will not have Connect-AzureRmAccount and, therefore, will receive an error.
@mcollier & @sdwheeler, thanks for the update. Looks like the fix is to either upgrade to v5.3.0 or use one of the supported aliases as a workaround. Perhaps we should make this explicitly clear in the article to clarify.
@jaspervd86, From threads above, we conclude the Connect-AzureRmAccount works but you will need to upgrade to v5.3.0 or higher.
We will now close this issue. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.
Here's how you upgrade the Automation Module. https://docs.microsoft.com/en-us/azure/automation/automation-update-azure-modules
Most helpful comment
@mcollier Sorry, I didn't read the whole thread.
Connect-AzureRmAccountis the correct cmdlet name starting with v5.3.0. For backward compatibility,Connect-AzureRmAccounthas the following aliases.Users that have not upgraded to v5.3.0 or higher will not have Connect-AzureRmAccount and, therefore, will receive an error.