Cmdlet Verb Name 中介绍了一些常用动词以及试用的环境, 大家在编写cmdlet, function时, 最好先进行一定了解.
命名规则可以帮助我们快速了解命令的功能, 再利用PSSnapin, 可以将不同命令划分成操作不同对象组, 以便于管理.
例如:
PS C
:
Documents and Settings
Administrator
>
Get
-
PSSnapin
Name
:
Microsoft
.
PowerShell
.
Core
PSVersion
:
2.0
Description
:
This Windows PowerShell snap
-
in contains Windows PowerShell management cmdlets used to manage components
of Windows PowerShell
.

Name
:
Microsoft
.
PowerShell
.
Host
PSVersion
:
2.0
Description
:
This Windows PowerShell snap
-
in contains cmdlets used by the Windows PowerShell host
.

Name
:
Microsoft
.
PowerShell
.
Management
PSVersion
:
2.0
Description
:
This Windows PowerShell snap
-
in contains management cmdlets used to manage Windows components
.

Name
:
Microsoft
.
PowerShell
.
Security
PSVersion
:
2.0
Description
:
This Windows PowerShell snap
-
in contains cmdlets to manage Windows PowerShell security
.

Name
:
Microsoft
.
PowerShell
.
Utility
PSVersion
:
2.0
Description
:
This Windows PowerShell snap
-
in contains utility Cmdlets used to manipulate data
.

Name
:
Microsoft
.
PowerShell
.
GetEvent
PSVersion
:
2.0
Description
:
This PS snap
-
in contains get
-
event cmdlet used to
read
Windows event
log
data and configuration
.
本文介绍了PowerShell中的Snap-ins及其包含的各种Cmdlets,这些Cmdlets被用于管理不同的Windows组件和服务,如核心管理、安全性配置等。文章还强调了在创建自定义Cmdlets时遵循命名规范的重要性。
309

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



