Set-SCOMAgentlessManagedComputer

更改无代理托管计算机的设置。

语法

FromAgentManagedBy

Set-SCOMAgentlessManagedComputer
    [-Computer] <RemotelyManagedComputer[]>
    [-ManagedByAgent] <AgentManagedComputer>
    [-PassThru]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

FromManagementServerManagedBy

Set-SCOMAgentlessManagedComputer
    [-Computer] <RemotelyManagedComputer[]>
    [-ManagedByManagementServer] <ManagementServer>
    [-PassThru]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

说明

Set-SCOMAgentlessManagedComputer cmdlet 更改无代理托管计算机的设置。

示例

示例 1:将 Operations Manager 代理设置为执行无代理监视

PS C:\>Get-SCOMAgentlessManagedComputer -DNSHostName "server02.contoso.com" | Set-SCOMAgentlessManagedComputer -ManagedByAgent (Get-SCOMAgent -DNSHostName "OMAgent01.contoso.com") -PassThru

此命令获取名为 server02 的无代理托管计算机,并使用管道运算符将其传递给 Set-SCOMAgentlessManagedComputer cmdlet。 该命令将名为 OMAgent01 的代理托管计算机设置为 Operations Manager 代理,用于对 server02 执行无代理监视。

参数

-Computer

指定无代理托管计算机的数组。 可以使用 Get-SCOMAgentlessManagedComputer cmdlet 获取没有代理的托管计算机。

参数属性

类型:

RemotelyManagedComputer[]

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

参数集

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

-Confirm

在运行 cmdlet 之前,提示你进行确认。

参数属性

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

参数集

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

-ManagedByAgent

指定 AgentManagedComputer 对象。 此参数指定执行无代理监视的 Operations Manager 代理。 执行监视的代理的操作帐户必须在监视的计算机上具有本地管理权限。

若要获取 AgentManagedComputer 对象,请使用 Get-SCOMAgent cmdlet。

参数属性

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

参数集

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

-ManagedByManagementServer

指定 ManagementServer 对象。 此参数指定执行无代理托管计算机的无代理监视的主管理服务器。 若要获取 ManagementServer 对象,请使用 Get-SCOMManagementServer cmdlet。

参数属性

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

参数集

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

-PassThru

指示 cmdlet 创建或修改命令可以在管道中使用的对象。 默认情况下,此 cmdlet 不生成任何输出。

参数属性

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

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):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