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.
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
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
Now, you can see that the profile got loaded successfully