Select-AzureRmProfile : The term ‘Select-AzureRmProfile’ is not recognized as the name of a cmdlet, function, script file, or operable program

I got a chance to work with PowerShell automation script to automate the login process. In the script, the profile is loaded using the Select-AzureRmProfile. If you try to log in using Select-AzureRmProfile you most likely encounter the following error message.

Error Message:

Select-AzureRmProfile : The term ‘Select-AzureRmProfile’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:36 char:1

+ Select-AzureRmProfile -Path c:\AzureDataLakeprofile.json

+ ~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : ObjectNotFound: (Select-AzureRmProfile:String) [], CommandNotFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

Select-rmAzureDL

Workaround:

The Select-AzureRmProfile is no-more a validate cmdlet. If you encounter Select-AzureRmProfile cmdlet in the script, you may need to replace with Save-AzureRmContext and Import-AzureRmContext.

PS:\>Save-AzureRmContext -Path c:\AzureDataLakeprofile.json

PS:\>Import-AzureRmContext -Path c:\AzureDataLakeprofile.json

Output:

Now, you can see that the profile got loaded successfully

Azureaccount

About Prashanth Jayaram

DB Technologist, Author, Blogger, Service Delivery Manager at CTS, Automation Expert, Technet WIKI Ninja, MVB and Powershell Geek My Profile: https://social.technet.microsoft.com/profile/prashanth jayaram/ http://www.sqlshack.com/author/prashanth/ http://codingsight.com/author/prashanthjayaram/ https://www.red-gate.com/simple-talk/author/prashanthjayaram/ http://www.sqlservercentral.com/blogs/powersql-by-prashanth-jayaram/ Connect Me: Twitter @prashantjayaram GMAIL powershellsql@gmail.com The articles are published in: http://www.ssas-info.com/analysis-services-articles/ http://db-pub.com/ http://www.sswug.org/sswugresearch/community/
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a comment