mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-19 11:11:29 +01:00
Add list-window-titles.ps1
This commit is contained in:
parent
8b49f0324c
commit
78d9fb668b
20
Scripts/list-window-titles.ps1
Normal file
20
Scripts/list-window-titles.ps1
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Lists window titles
|
||||||
|
.DESCRIPTION
|
||||||
|
This PowerShell script list all main window titles and displays them in a table.
|
||||||
|
.EXAMPLE
|
||||||
|
PS> ./list-window-titles
|
||||||
|
.LINK
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
.NOTES
|
||||||
|
Author: Markus Fleschutz | License: CC0
|
||||||
|
#>
|
||||||
|
|
||||||
|
try {
|
||||||
|
Get-Process | Where-Object {$_.mainWindowTitle} | Format-Table Id,Name,mainWindowtitle -AutoSize
|
||||||
|
exit 0 # success
|
||||||
|
} catch {
|
||||||
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
exit 1
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user