This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Test-IsWindowsTerminal { | |
| <# | |
| Adapted from | |
| https://mikefrobbins.com/2024/05/16/detecting-windows-terminal-with-powershell/ | |
| Changed to use the Parent property from Get-Process in pwsh (if possible) to | |
| avoid loading the CimCmdlets module. Since I use this test in my $PROFILE, | |
| it speeds things up and avoids unneccessary clutter. | |
| #> | |
| [CmdletBinding()] |