调查域名成员的屏幕分辨率

有没有办法通过WMI或Powershell来询问每个域成员在桌面上的分辨率? 我需要知道,但不能去参观每一个。 对于奖励积分,如何总结结果并仅显示每个分辨率的唯一结果? 相反,也就是说

  • 答:1920×1080
  • B:1920×1080
  • C:1200×800

它只会阅读

  • 1920×1080
  • 1200×800

你实际上可以直接拉他们的屏幕分辨率。 对于我自己和虚拟机, wmicpathWin32_VideoController获取VideoModeDescription运行良好。 (我运行64位,VM是32位)

这个和其他解决scheme在这里可用。

编辑:误解了民意测验的含义

另外:这两种方法的组合,为用户提供他们的屏幕分辨率作为默认条目,但给他们提交之前更改它的选项。

$screenres = wmic path Win32_VideoController get VideoModeDescription | findstr colors [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null $computer = [Microsoft.VisualBasic.Interaction]::InputBox("Hello, please enter your screen resolution. Thanks.", "Screen Resolution", "$screenres") 

它将被保存为$电脑。 如果你想要,或者你想收集它,将它logging到中性networking共享的日志中。

让我知道如果有什么不行,你需要一个替代解决scheme,或者你需要阐述。 感谢您的阅读!

看起来像你这样的东西:

从AD的所有PC中获得完整的描述

 Get-ADcomputer -Filer * | Get-WmiObject -Class Win32_VideoController 

只有当前的决议清单

 Get-ADcomputer -Filer * | (Get-WmiObject -Class Win32_VideoController).VideoModeDescription 

更新所以这将工作

 $computerlist = Get-ADComputer -Filter * | Select -Expand Name Get-WmiObject -Class Win32_VideoController -ComputerName $Computerlist