有什么办法可以列出所有的桌面和笔记本电脑的模型? 没有命名约定,我很难在我们的环境中区分笔记本电脑和台式机。
我已经尝试使用wmic但只有一台笔记本电脑。
c:\>wmic computersystem get model,name,manufacturer,systemtype Manufacturer Model Name SystemType LENOVO 2236EG1 WINCMD-PC x64-based PC
需要在域环境中运行。
可能是这样的,使用PowerShell。 请注意,取决于您的域的大小,这可能会打击您的域控制器很难; 我强烈build议你在顶部的“Get-ADComputer”上放一些除“*”之外的filter
$allComputer = Get-ADComputer -Filter "*" foreach ($c in $allComputer) { $wmi = Get-WmiObject -Computer $c.Name -Class "Win32_ComputerSystem" Write-Output "$($c.Name) - $($wmi.Manufacturer) $($wmi.Model) $($wmi.Name) $($wmi.SystemType)" }