上一主题: ism-applyPolicyTemplatesForService 命令-将策略模板应用于所有系统 (Funclet)下一主题: ism-cancelJob 命令-取消作业 (Funclet)


ism-applyPoliciesAndTemplatesForService 命令-将策略和模板应用于所有系统 (Funclet)

ism-applyPoliciesAndTemplatesForService 命令用于将策略和模板应用于受管服务中的所有计算机系统。

此命令具有以下格式:

ism-applyPoliciesAndTemplatesForService
-policyName policy_name 
-policyType policy_type 
-serviceName service_name
-templateName templateName
-templateOs templateOs
[-timeout time]
[-replaceExisting replaceExisting]
-policyName policy_name

指定要应用的策略名称。

默认值:

-policyType policy_type

指定策略类型。

-serviceName service_name

指定受管服务的名称。

注意:在服务名称中,使用双反斜杠作为分隔符。 使用单反斜杠作为分隔符会被解释为转义序列。 例如,将服务名称指定为“企业\\数据中心\\服务名称”,而不是“企业\数据中心\服务名称”。

-templateName templateName

指定模板的名称。

-templateOs templateOs

指定策略模板操作系统。

-timeout time

(可选)为该命令等待主机成功配置指定时间限制(以秒为单位),在此时间限制之后,将发生超时。 如果未指定,该命令将不等待主机成功配置。

默认值:30 秒。

注意:如果指定零,会发生默认系统范围超时。

-replaceExisting replaceExisting

(可选)使用新配置替换主机的现有配置。

示例:将策略和模板应用于所有系统

本示例将策略和模板应用于受管服务 CA Virtual Assurance。

ism-applyPoliciesAndTemplatesForService -policyName policy5 -policyType SystemEDGE -serviceName "Enterprise\\Data Center\\CA Virtual Assurance Services" -templateName template2 -templateOs windows -timeout 400 -replaceExisting yes