LoginSignup
0
2

More than 3 years have passed since last update.

PowerShellで環境変数をGUIで一覧表示

Last updated at Posted at 2020-04-12

Out-GridViewはPowerShell Core 6に実装されていないのでコマンドから省くとターミナルに表示できます。

環境変数をGUIで一覧表示

# 長いコマンド
Get-ChildItem env: | Out-GridView

# 短いコマンド
gci env: | ogv

環境変数PATHをGUIで一覧表示

# 長いコマンド
$env:PATH -split ';' | Out-GridView

# 短いコマンド
$env:PATH -split ';' | ogv

環境変数PATHを重複なし、重複回数を一覧表示

# 長いコマンド
$env:PATH -split ';' | Group-Object | Select-Object Name,Count | Out-GridView

# 短いコマンド
$env:PATH -split ';' | group | select Name,Count | ogv

環境変数PATHから存在しないフォルダを一覧表示

# 長いコマンド
$env:PATH -split ';' | Where-Object {-Not (Test-Path -PathType Container $_)} | Out-GridView

# 短いコマンド
$env:PATH -split ';' | ?{!(Test-Path -PathType Container $_)} | ogv
0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2