10
有没有一种方法可以从PowerShell中将窗口置于前面? 我想这可以隐藏所有窗口(工作),给我PowerShell的背面(不工作)最大化窗口并将其与powershell结合使用
[void] [System.Reflection.Assembly]::LoadWithPartialName("'Microsoft.VisualBasic")
$shell = New-Object -ComObject “Shell.Application”
$shell.MinimizeAll()
$a = Get-Process | Where-Object {$_.Name -like "powershell"}
[Microsoft.VisualBasic.Interaction]::AppActivate($a.ID)
有什么建议?
作品,如果我不” t最小化窗口使用$ shell.MinimizeAll() – ravikanth 2011-02-14 15:38:42
@ravikanth看来你是对的,如果窗口不是最小化的代码工作。所以也许我需要改变我的问题标题。 – Yots 2011-02-14 16:22:24