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的正確語法?