Save-AzureRmProfile issues

I created a VM in Azure and selected Windows Server 2012 R2.

I installed Windows PowerShell using the Web Platform Installer. When I try to run the following command:

Save-AzureRmProfile -Path C:\MyPath\myfile.json

      

It throws an error:

The term "Save-AzureRmProfile" is not recognized as the name of a cmdlet, function, script file, or operating program. Check the spelling of the name or the inclusion of the path, make sure the path is correct and try again.

I tried to follow this link here , adding environment variables, but didn't help. Has anyone solved this problem?

+3


source to share


4 answers


Save-AzureRmProfile

works in version 3.7. You can use the following cmdlet to check your Azure PowerShell version.

Get-Module -ListAvailable -Name Azure -Refresh

      



You can download the 3.7 version of the msi installer from this

+2


source


You need to install the Azure PowerShell cmdlets . I suggest you install it using the latest MSI from this site .




It looks like the cmdlet has Save-AzureRmProfile

been replaced with Save-AzureRmContext

. I found that the information is here .

+2


source


The cmdlet name was changed in 4.0, you can see all changes in 4.0 here: https://github.com/Azure/azure-powershell/blob/preview/documentation/release-notes/migration-guide.4.0.0.md

Unfortunately the name of the cmdlet was changed without an alias for backward compatibility in version 3.8, for this issue :. This is actually a bug we are pushing from version 3.9, which is identical to 3.8, except that two profile cmdlets (Save-AzureRmProfile, Select-AzureRmProfile) remove this change violation

+1


source


Save-AzureRmContext and Import-AzureRmContext can be used for the same purpose in version 4.0 Usage is the same!

0


source







All Articles