powershell SQL / SMP:列出包服务器

Posted

tags:

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

SELECT
  [FQDN] = [conn2]. [FQDN]
  , [Name] = UPPER( [conn1].[Name] )
  , [IP Address] = [conn1].[IP Address]
FROM
  [vComputer] [conn1]
  LEFT JOIN [Inv_AeX_AC_Identification] [conn2] ON [conn1]. [Guid] = [conn2].[_ResourceGuid]
WHERE [conn1]. [Guid] IN (
  SELECT DISTINCT [PkgSvrId]
  FROM [SWDPackageServer]
  )
ORDER BY
[conn1].[Name]
$PackageServers = Get-SMPSQLData -Instances "TNKNXSQL01\SMP" -Database "Symantec_CMDB_TNKNXSMP01" -CommandText 
"SELECT [FQDN] = [conn2].[FQDN], [Name] = UPPER([conn1].[Name]), [IP Address] = [conn1].[IP Address] FROM [vComputer] 
[conn1] LEFT JOIN [Inv_AeX_AC_Identification] [conn2] ON [conn1].[Guid] = [conn2].[_ResourceGuid] WHERE [conn1]. 
[Guid] IN (SELECT DISTINCT [PkgSvrId] FROM [SWDPackageServer]) ORDER BY [conn1].[Name]"

以上是关于powershell SQL / SMP:列出包服务器的主要内容,如果未能解决你的问题,请参考以下文章

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

sql SMP:列出筛选器成员

powershell PowerShell:[SMP]运行广告

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

sql SQL:SMP资源关联父/子

sql SQL:所有可用的SMP报告