我對Powershell腳本非常陌生。如何在Powershell腳本中編寫此代碼?
我試圖從一個cmd
powershell.exe Set-ExecutionPolicy Unrestricted
powershell.exe .\startup.ps1
我需要PowerShell腳本中的兩條線運行PowerShell腳本。
%WINDIR%\system32\inetsrv\appcmd.exe add apppool /name:"VCPool" /managedRuntimeVersion:"v4.0" /managedPipelineMode:"Integrated"
%WINDIR%\system32\inetsrv\appcmd.exe set app "WebRole_IN_0_VC/" /applicationPool:"VCPool"
我可以在ps1文件中這樣寫嗎?
& %WINDIR%\system32\inetsrv\appcmd.exe add apppool /name:"VCPool" /managedRuntimeVersion:"v4.0" /managedPipelineMode:"Integrated"
非常感謝
喬伊,非常感謝你這很好的一步一步指導。它現在有效。 – Houman