or1ko's diary

日々を書きます

Cmdletを分類1

CmdLetを、Nounプロパティで分類してみた。

PS C:\Users\mono> Get-Command -CommandType Cmdlet | Group-Object Noun | Sort-Object Count -Descending

Count Name                      Group
----- ----                      -----
    9 Object                    {Compare-Object, ForEach-Object, Group-Object, Measure-Object...}
    9 Item                      {Clear-Item, Copy-Item, Get-Item, Invoke-Item...}
    8 ItemProperty              {Clear-ItemProperty, Copy-ItemProperty, Get-ItemProperty, Move-ItemProperty...}
    8 Service                   {Get-Service, New-Service, Restart-Service, Resume-Service...}
    7 PSSession                 {Enter-PSSession, Exit-PSSession, Export-PSSession, Get-PSSession...}
    7 EventLog                  {Clear-EventLog, Get-EventLog, Limit-EventLog, New-EventLog...}
    6 PSSessionConfiguration    {Disable-PSSessionConfiguration, Enable-PSSessionConfiguration, Get-PSSessionConfigu...
    6 Job                       {Get-Job, Receive-Job, Remove-Job, Start-Job...}
    6 Computer                  {Add-Computer, Checkpoint-Computer, Remove-Computer, Restart-Computer...}
    5 Process                   {Debug-Process, Get-Process, Start-Process, Stop-Process...}
    5 Path                      {Convert-Path, Join-Path, Resolve-Path, Split-Path...}
    5 PSBreakpoint              {Disable-PSBreakpoint, Enable-PSBreakpoint, Get-PSBreakpoint, Remove-PSBreakpoint...}
    5 Event                     {Get-Event, New-Event, Remove-Event, Unregister-Event...}
    5 Alias                     {Export-Alias, Get-Alias, Import-Alias, New-Alias...}
    5 Variable                  {Clear-Variable, Get-Variable, New-Variable, Remove-Variable...}
    5 Transaction               {Complete-Transaction, Get-Transaction, Start-Transaction, Undo-Transaction...}
    4 Content                   {Add-Content, Clear-Content, Get-Content, Set-Content}
    4 History                   {Add-History, Clear-History, Get-History, Invoke-History}
    4 Command                   {Get-Command, Invoke-Command, Measure-Command, Trace-Command}
    4 Host                      {Get-Host, Out-Host, Read-Host, Write-Host}
    4 Module                    {Get-Module, Import-Module, New-Module, Remove-Module}
    4 Csv                       {ConvertFrom-Csv, ConvertTo-Csv, Export-Csv, Import-Csv}
    4 WSManInstance             {Get-WSManInstance, New-WSManInstance, Remove-WSManInstance, Set-WSManInstance}
    4 Location                  {Get-Location, Pop-Location, Push-Location, Set-Location}
    3 FormatData                {Export-FormatData, Get-FormatData, Update-FormatData}
    3 PSDrive                   {Get-PSDrive, New-PSDrive, Remove-PSDrive}
    3 Counter                   {Export-Counter, Get-Counter, Import-Counter}
    3 WSManCredSSP              {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredSSP}
    3 WSMan                     {Connect-WSMan, Disconnect-WSMan, Test-WSMan}
    3 PSSnapin                  {Add-PSSnapin, Get-PSSnapin, Remove-PSSnapin}
    2 Transcript                {Start-Transcript, Stop-Transcript}
    2 TraceSource               {Get-TraceSource, Set-TraceSource}
    2 String                    {Out-String, Select-String}
    2 ExecutionPolicy           {Get-ExecutionPolicy, Set-ExecutionPolicy}
    2 SecureString              {ConvertFrom-SecureString, ConvertTo-SecureString}
    2 Date                      {Get-Date, Set-Date}
    2 Member                    {Add-Member, Get-Member}
    2 AuthenticodeSignature     {Get-AuthenticodeSignature, Set-AuthenticodeSignature}
    2 ComputerRestore           {Disable-ComputerRestore, Enable-ComputerRestore}
    2 Clixml                    {Export-Clixml, Import-Clixml}
    2 ModuleManifest            {New-ModuleManifest, Test-ModuleManifest}
    2 Xml                       {ConvertTo-Xml, Select-Xml}
    2 List                      {Format-List, Update-List}
    2 WmiObject                 {Get-WmiObject, Remove-WmiObject}
    2 Acl                       {Get-Acl, Set-Acl}
    1 Null                      {Out-Null}
    1 Printer                   {Out-Printer}
    1 GridView                  {Out-GridView}
    1 WSManSessionOption        {New-WSManSessionOption}
    1 ObjectEvent               {Register-ObjectEvent}
    1 WebServiceProxy           {New-WebServiceProxy}
    1 File                      {Out-File}
    1 Default                   {Out-Default}
    1 EngineEvent               {Register-EngineEvent}
    1 WmiEvent                  {Register-WmiEvent}
    1 Debug                     {Write-Debug}
    1 Error                     {Write-Error}
    1 Connection                {Test-Connection}
    1 TypeData                  {Update-TypeData}
    1 Verbose                   {Write-Verbose}
    1 Warning                   {Write-Warning}
    1 Output                    {Write-Output}
    1 Progress                  {Write-Progress}
    1 PSDebug                   {Set-PSDebug}
    1 StrictMode                {Set-StrictMode}
    1 ComputerMachinePassword   {Reset-ComputerMachinePassword}
    1 MailMessage               {Send-MailMessage}
    1 Sleep                     {Start-Sleep}
    1 ComputerSecureChannel     {Test-ComputerSecureChannel}
    1 WmiInstance               {Set-WmiInstance}
    1 WSManQuickConfig          {Set-WSManQuickConfig}
    1 TimeSpan                  {New-TimeSpan}
    1 ChildItem                 {Get-ChildItem}
    1 Wide                      {Format-Wide}
    1 Table                     {Format-Table}
    1 ComputerRestorePoint      {Get-ComputerRestorePoint}
    1 EventSubscriber           {Get-EventSubscriber}
    1 Culture                   {Get-Culture}
    1 Credential                {Get-Credential}
    1 Html                      {ConvertTo-Html}
    1 StringData                {ConvertFrom-StringData}
    1 Type                      {Add-Type}
    1 PSRemoting                {Enable-PSRemoting}
    1 Custom                    {Format-Custom}
    1 ModuleMember              {Export-ModuleMember}
    1 Console                   {Export-Console}
    1 LocalizedData             {Import-LocalizedData}
    1 WinEvent                  {Get-WinEvent}
    1 Unique                    {Get-Unique}
    1 Expression                {Invoke-Expression}
    1 PSSessionOption           {New-PSSessionOption}
    1 WSManAction               {Invoke-WSManAction}
    1 WmiMethod                 {Invoke-WmiMethod}
    1 PfxCertificate            {Get-PfxCertificate}
    1 HotFix                    {Get-HotFix}
    1 Help                      {Get-Help}
    1 PSCallStack               {Get-PSCallStack}
    1 UICulture                 {Get-UICulture}
    1 Random                    {Get-Random}
    1 PSProvider                {Get-PSProvider}


CmdLetを、Nounプロパティで分類してみた。

PS C:\Users\mono> Get-Command -CommandType Cmdlet | Group-Object Verb | Sort-Object Count -Descending

Count Name                      Group
----- ----                      -----
   46 Get                       {Get-Acl, Get-Alias, Get-AuthenticodeSignature, Get-ChildItem...}
   19 Set                       {Set-Acl, Set-Alias, Set-AuthenticodeSignature, Set-Content...}
   17 New                       {New-Alias, New-Event, New-EventLog, New-Item...}
   14 Remove                    {Remove-Computer, Remove-Event, Remove-EventLog, Remove-Item...}
    8 Export                    {Export-Alias, Export-Clixml, Export-Console, Export-Counter...}
    8 Write                     {Write-Debug, Write-Error, Write-EventLog, Write-Host...}
    7 Import                    {Import-Alias, Import-Clixml, Import-Counter, Import-Csv...}
    7 Out                       {Out-Default, Out-File, Out-GridView, Out-Host...}
    6 Add                       {Add-Computer, Add-Content, Add-History, Add-Member...}
    6 Start                     {Start-Job, Start-Process, Start-Service, Start-Sleep...}
    6 Invoke                    {Invoke-Command, Invoke-Expression, Invoke-History, Invoke-Item...}
    6 Clear                     {Clear-Content, Clear-EventLog, Clear-History, Clear-Item...}
    5 Stop                      {Stop-Computer, Stop-Job, Stop-Process, Stop-Service...}
    5 Test                      {Test-ComputerSecureChannel, Test-Connection, Test-ModuleManifest, Test-Path...}
    5 Enable                    {Enable-ComputerRestore, Enable-PSBreakpoint, Enable-PSRemoting, Enable-PSSessionCon...
    4 Register                  {Register-EngineEvent, Register-ObjectEvent, Register-PSSessionConfiguration, Regist...
    4 ConvertTo                 {ConvertTo-Csv, ConvertTo-Html, ConvertTo-SecureString, ConvertTo-Xml}
    4 Format                    {Format-Custom, Format-List, Format-Table, Format-Wide}
    4 Disable                   {Disable-ComputerRestore, Disable-PSBreakpoint, Disable-PSSessionConfiguration, Disa...
    3 ConvertFrom               {ConvertFrom-Csv, ConvertFrom-SecureString, ConvertFrom-StringData}
    3 Select                    {Select-Object, Select-String, Select-Xml}
    3 Wait                      {Wait-Event, Wait-Job, Wait-Process}
    3 Update                    {Update-FormatData, Update-List, Update-TypeData}
    2 Unregister                {Unregister-Event, Unregister-PSSessionConfiguration}
    2 Restart                   {Restart-Computer, Restart-Service}
    2 Rename                    {Rename-Item, Rename-ItemProperty}
    2 Move                      {Move-Item, Move-ItemProperty}
    2 Copy                      {Copy-Item, Copy-ItemProperty}
    2 Measure                   {Measure-Command, Measure-Object}
    1 Suspend                   {Suspend-Service}
    1 Tee                       {Tee-Object}
    1 Debug                     {Debug-Process}
    1 ForEach                   {ForEach-Object}
    1 Sort                      {Sort-Object}
    1 Split                     {Split-Path}
    1 Checkpoint                {Checkpoint-Computer}
    1 Trace                     {Trace-Command}
    1 Disconnect                {Disconnect-WSMan}
    1 Where                     {Where-Object}
    1 Pop                       {Pop-Location}
    1 Use                       {Use-Transaction}
    1 Undo                      {Undo-Transaction}
    1 Exit                      {Exit-PSSession}
    1 Enter                     {Enter-PSSession}
    1 Show                      {Show-EventLog}
    1 Limit                     {Limit-EventLog}
    1 Compare                   {Compare-Object}
    1 Join                      {Join-Path}
    1 Receive                   {Receive-Job}
    1 Complete                  {Complete-Transaction}
    1 Push                      {Push-Location}
    1 Read                      {Read-Host}
    1 Reset                     {Reset-ComputerMachinePassword}
    1 Group                     {Group-Object}
    1 Send                      {Send-MailMessage}
    1 Connect                   {Connect-WSMan}
    1 Resume                    {Resume-Service}
    1 Resolve                   {Resolve-Path}
    1 Convert                   {Convert-Path}
    1 Restore                   {Restore-Computer}