Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Connect to Azure to Leverage PowerShell Cmdlets

$
0
0

Summary: Learn how to use the Microsoft Azure cmdlets to connect to an Azure subscription.

Hey, Scripting Guy! Question I downloaded the Azure PowerShell cmdlets, and I when I run them, they produce an
           error. How do I authenticate to Microsoft Azure from the cmdlets?

Hey, Scripting Guy! Answer Use a combination of two cmdlets (Get-AzurePublishSettingsFile and Import-AzurePublishSettingsFile)
           your first time:

Get-AzurePublishSettingsFile

This prompts for authentication to Azure and prompts you to save a file on your local drive.
The file extension is .publishsettings.

Then run:

Import-AzurePublishSettingsFile filename.publishsettings

Now you can access your default Azure subscription from Windows PowerShell.

Note Please store this file in a secure location because it provides authentication to Azure.


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>