Powershell provides a platform and a friendly way of automating many repeated tasks, which in turn minimizes the time and cost. Powershell always comes to the rescue when there is a need for automation, and it is no different for Azure.
In today's article, we will show you how to create an Azure login profile and use it for your Azure automation.
The first step is to open the PowerShell console and run the below command to connect to the Azure account.
Once you type the above command and hit enter you will get a popup window asking for the credentials to connect to your Azure account. After the successful authentication, it will direct you to the PowerShell console.
The next step is to create and save your Azure Profile, run the below command to create your Azure profile
Once you run this command it will create and save your azure profile in JSON format at the path provided by you in the above command. You can now use the generated JSON file to connect to Azure subscriptions and perform the automation.
Use the below command to import the Azure profile created above
This will import your Azure Profile and then you can use the below command to connect to Azure subscriptions
Using the above approach you just need to create your Azure profile once by entering the Credentials and then you just need to import the JSON file in all your automation.
0 comments:
Post a Comment