add-type -AssemblyName System.Windows.Forms
$CWidth = (([System.Windows.Forms.Screen]::PrimaryScreen).Bounds).Width
$CHeight = (([System.Windows.Forms.Screen]::PrimaryScreen).Bounds).Height
powershell脚本获取电脑分辨率
最新推荐文章于 2025-10-20 16:50:30 发布
本文介绍了一种使用 PowerShell 脚本获取当前主屏幕宽度和高度的方法。通过调用 System.Windows.Forms 命名空间下的 Screen 类,可以准确地读取到主屏幕的分辨率信息。
1万+

被折叠的 条评论
为什么被折叠?



