LoginSignup
0
1

More than 5 years have passed since last update.

Powershell動詞別コマンドランキング~

Posted at

Powershell動詞別コマンドランキング~

powershellのコマンドは「Get-Content」のように動詞(的な何か)-目的語のような形式になっています。
さらにGet-Verbというコマンドで頭に使える動詞一覧が出てきます。
さらにさらにGet-Commandコマンドを使えばその動詞が接頭辞になっているコマンド一覧が出てきます。

というわけで動詞別にコマンドの多い順番ランキング作れるよね?
というわけで作ってみました。

コマンドこちら~

 Get-Verb | %{ [pscustomobject]@{ Verb = $_.Verb ; Commands = @(Get-Command -Verb $_.Verb).Length  } } | Sort-Object -Property Commands -Descending

結果こちら~(powershellのバージョンとかで多分変わります。)

Verb        Commands
----        --------
Get             1032
Set              535
Remove           467
New              440
Add              155
Enable            92
Disable           89
Start             81
Stop              63
Update            43
Import            37
Test              37
Export            35
Reset             29
Clear             23
Invoke            22
Register          21
Rename            20
Save              20
Unregister        19
Restart           18
Move              16
Publish           15
Write             13
Restore           13
Resume            13
Find              11
Show              11
Copy              10
Suspend           10
Wait              10
Select            10
Install            9
ConvertTo          7
ConvertFrom        7
Out                7
Repair             7
Debug              7
Format             7
Grant              6
Revoke             6
Use                6
Uninstall          6
Resize             6
Disconnect         5
Backup             5
Send               5
Mount              5
Connect            4
Sync               4
Join               4
Unblock            4
Confirm            3
Complete           3
Submit             3
Resolve            3
Optimize           3
Receive            3
Undo               3
Dismount           3
Initialize         3
Edit               3
Unpublish          3
Expand             3
Close              2
Convert            2
Measure            2
Split              2
Enter              2
Assert             2
Exit               2
Block              2
Switch             2
Read               2
Hide               1
Protect            1
Trace              1
Unprotect          1
Lock               1
Compare            1
Checkpoint         1
Unlock             1
Group              1
Merge              1
Compress           1
Pop                1
Push               1
Limit              1
Open               1
Redo               0
Ping               0
Search             0
Step               0
Request            0
Skip               0
Watch              0
Approve            0
Deny               0

見た感じ

圧倒的にGet/Setが多いですね~
Newはインスタンスを作成するコマンドが多いから上位って感じですね。

Enable/Disable,Start/Stopのペアもなかなか多い

逆に0のやつもある。
Requestなんかは多分これInvoke-WebRequestとかに食われているのでは…

Push/PopのペアはPush-Location一個だけでした。けどこれ地味に便利そう。ディレクトリをスタック式に乗せられるみたいです。(あ、shにそういうコマンドあるのね)

0
1
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
1