1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PowerShellのShell変数メモ

Posted at

PowerShellとは

そろそろ知名度はコマンドプロンプトぐらいにはなってきたでしょうか?
コマンドプロンプトに替わるWindowsの新しいシェルです。
新しいとはいっても、Windows7から実装されてそろそろ10年ほど経過しています。
今ではWindowsだけではなく、MacOSやLinuxでも使えます。
特に、

  • ActiveDirectory
  • office365
  • Azure

等をコマンドで操作できるところにPowerShellの独自性と強みがあります。

シェル変数

シェル変数を忘れることが多いため、メモとして記録

シェル変数 説明
$_ スクリプトブロックないし現在のパイプラインオブジェクト
$Args 引数
$foreach foreachループ内で処理されるオブジェクト
$PSCulture システム言語
$PWD カレントディレクトリ
$true TRUE
$false FALSE
$null NULL
$PSVersionTable PowerShellのバージョン情報等
1
3
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
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?