What do you someone breaks something? I post the solution here...

Kubernetes (K8s/K3d) / Terraform / Ansible / Linux / AWS / Docker / Bash / Python / ELK / CI/CD / Java / Traefik / Nginx / CentOs / Ubuntu


SILENT LOGIN TO AZURE ACCOUNT





SILENT LOGIN TO AZURE ACCOUNT


                       
                   Here is have used windows powershell ISE ,This is the first step.



                  Executing  Login-AzureRmAccount command that will prompt you for the 
                 Azure credentials

         


               Enter you credentials and select the type of account ,After that you will be acknowledged 
              success message at console with your subscription details


           This is the first script file in which we will manually login and store the credentials into a json 
           file that we can use later for silent login

             

  #****************************************************************
 # Author: Shailesh Thakur 
 # Description : HOW TO HAVE A LOGIN TO AZURE WITHOUT PROMPT
 #               Silent Login
 # Version: 1.0
 # Reference : Azure Support/Help Pages
 #****************************************************************


 #*** This Command is used to Login to the Azure Account(RM)*****
 #*** This Prompts User credentials as shown in Screenshot below*
 Login-AzureRmAccount


 #**This Command will just Get azure Resource Groups*************
 #*** ONly Displays Name As of now this command has no importance
 #** SO JUST INGNORE IT
 Get-AzureRmresourceGroup | Select ResourceGroupName


 #****Actually Azure RM profile will return a json which has a***
 #*** Results of the last command and with credentials **********
 #***SO lets Save it to a particular location i am just passing *
 #** Name it creates file where my script runs One can give *****
 #***Fully Qualified Path to save the file and use it in future *

 Save-AzureRmProfile -Path “azureprofile.json”

 #*********************HAPPY CODING******************************


    Now the Second file is written below file 2

#**********Now All You Have to do is Use that saved file**********
#** For Authentication *******************************************



 Select-AzureRmProfile -Path “azureprofile.json”

 Get-AzureRmresourceGroup | Select ResourceGroupName


 #***Congrats!! Now You Can Use That As Many times You Want******




Note:: Person of Contact:Shailesh thakur(timime687@gmail.com)

2 comments:

Unknown said...

thank you sir ji

Unknown said...

http://soa-bpel-osb.blogspot.in/2016/10/oracle-service-bus-12c-new-and-changed.html

Powered by Blogger.