私のServiceDefinition.csdefファイルには、次のものがあります。
<Startup>
<Task commandLine="powershell -ExecutionPolicy Unrestricted -command "Install-WindowsFeature Net-Framework-Core"" taskType="simple" executionContext="elevated"/>
</Startup>
しかし、それを紺碧に公開しようとすると、次のようになります。
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を実行するための正しい構文は何ですか?