【发布时间】:2016-11-08 10:22:47
【问题描述】:
我已在本地系统上安装了所需的软件和 Azure PowerShell cmdlet。我尝试通过从 Visual Studio Code Terminal 连接到 Azure 来执行 powershell 脚本。以下是错误。
Import-Module Microsoft.Online.SharePoint.PowerShell
function PublishToAzure{
Add-AzureAccount
......
......
}
错误是.. Add-AzureAccount : 句柄无效
Visual Studio 代码设置:
// Place your settings in this file to overwrite the default settings
{
"terminal.integrated.shell.windows": "C:\\WINDOWS\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"
}
Windows Azure Active Directory Module for Windows PowerShell 属性的控制台 目标是:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoExit -Command "Import-Module MSOnline"
系统属性:64位Win7操作系统
【问题讨论】:
标签: powershell azure visual-studio-code