Powershell 桌面刷新
Powershell desktop refresh
尝试在 powershell 最小化所有 windows 的地方刷新桌面,然后将其恢复。问题是.. windows 最小化后桌面不刷新。
$shell = New-Object -ComObject "Shell.Application"
$shell.minimizeall()
start-sleep 1
$shell.sendkeys('{F5}')
start-sleep 1
$shell.undominimizeall()
exit
你可以使用这个:
$shell = New-Object -ComObject Shell.Application
$shell.minimizeall()
start-sleep 1
$wsh = New-Object -ComObject Wscript.Shell
$wsh.sendkeys('{F5}')
start-sleep 1
$shell.undominimizeall()
exit
尝试在 powershell 最小化所有 windows 的地方刷新桌面,然后将其恢复。问题是.. windows 最小化后桌面不刷新。
$shell = New-Object -ComObject "Shell.Application"
$shell.minimizeall()
start-sleep 1
$shell.sendkeys('{F5}')
start-sleep 1
$shell.undominimizeall()
exit
你可以使用这个:
$shell = New-Object -ComObject Shell.Application
$shell.minimizeall()
start-sleep 1
$wsh = New-Object -ComObject Wscript.Shell
$wsh.sendkeys('{F5}')
start-sleep 1
$shell.undominimizeall()
exit