目次
文書の過去の版を表示しています。
PowerShell
本家: PowerShell Documentation | Microsoft Docs
ソースコード: GitHub - PowerShell/PowerShell: PowerShell for every system!
PowerShell (パワーシェル)は、マイクロソフトが開発した拡張可能なコマンドラインインターフェース (CLI) シェルおよびスクリプト言語である。オブジェクト指向に基づいて設計されており、.NET Frameworkと.NET Coreを基盤としている。
かつては Microsoft Shell (MSH、コードネーム Monad) と呼ばれていた。
Windows 7 以降のオペレーティングシステム (OS) には標準で搭載されている。
PowerShell のバージョン
PS > Get-Host Name : ConsoleHost Version : 5.1.18362.145 InstanceId : e2c61d93-3cfd-48be-9ab0-78013d5da518 UI : System.Management.Automation.Internal.Host.InternalHostUserInterface CurrentCulture : ja-JP CurrentUICulture : ja-JP PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy DebuggerEnabled : True IsRunspacePushed : False Runspace : System.Management.Automation.Runspaces.LocalRunspace PS > $PSVersiontable Name Value ---- ----- PSVersion 5.1.18362.145 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.18362.145 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
hosts ファイルの編集 (管理者として実行)
PS > start-process notepad c:\windows\system32\drivers\etc\hosts -verb runas
サービスの起動/停止 (管理者として実行)
PS > start-process net -argumentlist "start postgresql-x64-11" -verb runas PS > start-process net -argumentlist "stop postgresql-x64-11" -verb runas