目次
文書の過去の版を表示しています。
PowerShell
PowerShell - Linux
本家: PowerShell Documentation | Microsoft Docs
ソースコード: GitHub - PowerShell/PowerShell: PowerShell for every system!
最新バージョン:
PowerShell (パワーシェル)は、マイクロソフトが開発した拡張可能なコマンドラインインターフェース (CLI) シェルおよびスクリプト言語である。オブジェクト指向に基づいて設計されており、.NET Frameworkと.NET Coreを基盤としている。
かつては Microsoft Shell (MSH、コードネーム Monad) と呼ばれていた。
Windows 7 以降のオペレーティングシステム (OS) には標準で搭載されている。
ダウンロード
Releases · PowerShell/PowerShell
https://aka.ms/pscore6
https://aka.ms/pscore6-docs
Releases · PowerShell/PowerShell - Release Candidate 1
Releases · PowerShell/PowerShell - Release Candidate 2
PowerShell のバージョン
PS > Get-Host Name : ConsoleHost Version : 6.2.4 InstanceId : 3a2ed9d0-2c0b-42d5-976a-459d8e3f07af 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 > Get-Host | Select-Object Version Version ------- 6.2.4 PS > $PSVersiontable Name Value ---- ----- PSVersion 6.2.4 PSEdition Core GitCommitId 6.2.4 OS Microsoft Windows 10.0.19559 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
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