sql SQL / SMP:列出自动化策略

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql SQL / SMP:列出自动化策略相关的知识,希望对你有一定的参考价值。

-- List Automation Policies
SELECT
	[_ItemGuid] = [vi1].[Guid]
	, [Automation Policy] = [vi1].[Name]
	, [Automation Policy Guid] = [vi1].[Guid]
	, [Owner] = [vi2].[Name]
	, [Owner Guid] = [vi2].[Guid]
FROM
	[vItem] [vi1]
	left join [vSecurityEntity] [vse1] on [vi1].[Guid] = [vse1].[Guid]
	LEFT JOIN [vItem] [vi2] ON [vse1].[Owner] = [vi2].[Guid]
WHERE
	-- Altiris.Automation.AutomationPolicies.AutomationPolicy
	[vi1].[ClassGuid] = 'BEC44BD0-F31C-43C2-9391-52F176D67A04'
ORDER BY [vi1].[Name]
-- List Automation Policies
SELECT
	[Automation Policy] = [vi1].[Name]
	, [Automation Policy Guid] = [vi1].[Guid]
	, [Owner] = [vi2].[Name]
	, [Owner Guid] = [vi2].[Guid]
FROM
	[vItem] [vi1]
	left join [vSecurityEntity] [vse1] on [vi1].[Guid] = [vse1].[Guid]
	LEFT JOIN [vItem] [vi2] ON [vse1].[Owner] = [vi2].[Guid]
WHERE
	-- Altiris.Automation.AutomationPolicies.AutomationPolicy
	[vi1].[ClassGuid] = 'BEC44BD0-F31C-43C2-9391-52F176D67A04'
ORDER BY [vi1].[Name]
-- List Automation Policies
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
SELECT *
FROM [vItem]
WHERE [ClassGuid] = 'BEC44BD0-F31C-43C2-9391-52F176D67A04' -- Altiris.Automation.AutomationPolicies.AutomationPolicy
ORDER BY [Name]

以上是关于sql SQL / SMP:列出自动化策略的主要内容,如果未能解决你的问题,请参考以下文章

sql SMP:列出已知的代理名称

sql SMP:列出筛选器成员

powershell SQL / SMP:列出包服务器

sql SQL:[SMP]隐藏补丁启动窗口

sql SQL:SMP资源关联父/子

sql SQL:所有可用的SMP报告