Scripting‎ > ‎

Installing PowerShell from the Command Line

To install PowerShell from the command line in Windows Server 2008, run the following command (note: requires administrator privileges)

servermanagercmd -install powershell

To set the PowerShell Set-Executionpolicy from the Windows command line, use the following command

powershell -Command "& {Set-Executionpolicy -ExecutionPolicy RemoteSigned}"

To check the PowerShell execution policy from the Windows command line, use the following command

powershell -Command "& {Get-Executionpolicy}"
Comments