Monthly Archives: June 2012

Windows Server 2008でPowerShellの実行を有効化

  サーバでPowerShellのスクリプトを作成し、.ps1ファイルを実行するためには、スクリプトの実行ポリシーを変更する必要がある。 PowerShellを起動し、 [powershell] Set-ExecutionPolicy RemoteSigned [/powershell] を実行する。RemoteSignedを指定すると、ローカルに保存された.ps1ファイルと、インターネット経由でダウンロードしたファイルの内署名入りのものが実行可能になる。 現状の実行ポリシーを確認するには、 [powershell] Get-ExecutionPolicy [/powershell] を実行すること。

Posted in Windows | Comments closed