Write-SCOMCommand

编写一个新命令以与 Operations Manager 交互。

语法

Name (默认值)

Write-SCOMCommand
    -Name <String>
    [<CommonParameters>]

NoName

Write-SCOMCommand
    [-NoName]
    [<CommonParameters>]

说明

Write-SCOMCommand cmdlet 编写新的 Windows PowerShell 命令以与 System Center - Operations Manager 交互。 新命令使用与标准 Operations Manager cmdlet 相同的常见 SDK 连接代码。

示例

示例 1:编写新的脚本命令

PS C:\>Write-SCOMCommand -Name "Test-DivBManagementPack"

此命令输出名为 Test-DivBManagementPack 的新脚本命令模板。

参数

-Name

指定命令的名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

Name
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-NoName

指示 cmdlet 创建未命名的脚本。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

NoName
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters