May 22nd, 2009

Get-WindowTitle.ps1

PowerShell Team
PowerShell Team

I do this so frequently that I finally put it into a script called Get-WindowTitle.ps1 .

Get-Process |where {$_.mainWindowTItle} |format-table id,name,mainwindowtitle –AutoSize

Here is what it does:

[4696:0]PS> Get-WindowTitle

  Id Name              MainWindowTitle
  — —-              —————
2448 mmc               Server Manager
4696 powershell        Administrator: Windows PowerShell
3828 powershell_ise    Administrator: C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe
4116 WindowsLiveWriter Get-VisibleProcess.ps1 – Windows Live Writer

Enjoy!

Jeffrey Snover [MSFT]
Distinguished Engineer
Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Category
PowerShell

Author

PowerShell Team
PowerShell Team

PowerShell is a task-based command-line shell and scripting language built on .NET. PowerShell helps system administrators and power-users rapidly automate tasks that manage operating systems (Linux, macOS, and Windows) and processes.

0 comments

Discussion are closed.

Feedback