Install-Module AzureAD
$password = ConvertTo-SecureString "password" -AsPlainText -Force
$Cred = New-Object System.Management.Automation.PSCredential ("username@dev.com", $password)
Connect-AzureAD -Credential $Cred
This is my sample Azure Powershell script. I've run it through Windows PowerShell ISE. Is there any way to run Azure cmdlets using Visual Studio 2017? Or any Nuget Packages available for referencing the library for Azure Powershell commands?
Thanks!
You can install PowerShell Tools from the Visual Studio Installer as an individual component or as a part of the "Azure development" workload.
To install PowerShell Tools as an individual component:
After installing click on View => Other Windows => PowerShell Interactive Window => and run your cmdlet:
Additional for PRADEEP. We could install the Powershell tool with Visual Studio Installer. We also could install it from VS extensions and updates.
After that we could create the PowerShell project and script. We also could debug and run the scrpits in the VS.
Note: If you want to install Module, then we need to run the VS with administrator rights , or will get the error info Administrator rights are required to install modules
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.