Mastering PowerShell: Aliases, Functions, and Objects
1. Static Method Parameter Passing
The syntax for passing parameters in a call to a static method is [ClassName]::MethodName(parameter1, parameter2, …) . For example, to display information about a process using a static method of the [System.Diagnostics.Process] class:
[System.Diagnostics.Process]::GetProcessById(0)
The output will be something like:
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
------- ------ ----- ----- ----- ------ -- -----------
0 0 0 24 0 0 Idle
超级会员免费看
订阅专栏 解锁全文
2252

被折叠的 条评论
为什么被折叠?



