Enable-SCOMNotificationSubscription
启用通知订阅。
语法
Default (默认值)
Enable-SCOMNotificationSubscription
[-Subscription] <NotificationSubscription[]>
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
Enable-SCOMNotificationSubscription cmdlet 在 System Center - Operations Manager 中启用通知订阅。
示例
示例 1:启用所有通知订阅
PS C:\>Get-SCOMNotificationSubscription | where-object{$_.Enabled -eq $false} | Enable-SCOMNotificationSubscription
此命令启用所有禁用的通知。
示例 2:为特定用户启用通知订阅
PS C:\>Get-SCOMNotificationSubscription | where-object{$_.ToRecipients -contains "Contoso\SarahJones"} | Enable-SCOMNotificationSubscription
此命令启用 TO 行包含特定用户的所有通知。
参数
-Confirm
在运行 cmdlet 之前,提示你进行确认。
参数属性
| 类型: | SwitchParameter |
| 默认值: | False |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | cf |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-PassThru
指示 cmdlet 创建或修改命令可以在管道中使用的对象。 默认情况下,此 cmdlet 不生成任何输出。
参数属性
| 类型: | SwitchParameter |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-Subscription
指定要启用的订阅数组。 若要获取通知订阅对象,请使用 Get-SCOMNotificationSubscription cmdlet。
参数属性
| 类型: | NotificationSubscription[] |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | 1 |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。 cmdlet 未运行。
参数属性
| 类型: | SwitchParameter |
| 默认值: | False |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | 无线 |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。