2
运行PowerShell的在我ServiceDefinition.csdef中的文件我有这样的:从蔚蓝的启动任务
<Startup>
<Task commandLine="powershell -ExecutionPolicy Unrestricted -command "Install-WindowsFeature Net-Framework-Core"" taskType="simple" executionContext="elevated"/>
</Startup>
但是当我尝试将其发布到Azure,我得到:
Cannot find file named 'approot\bin\powershell' for startup task powershell -ExecutionPolicy Unrestricted -command "Install-WindowsFeature Net-Framework-Core" of role WebRole.
我试着运行powershell,这样我就可以安装.net 3.5是OS家族“3”(windows 2012)。该命令从cmd行运行良好,同时远程访问我的实例。
什么是运行powershell的正确语法?