external help file | Module Name | online version | schema |
---|---|---|---|
WTToolBox-help.xml |
WTToolBox |
2.0.0 |
Test if an updated version of Windows Terminal is installed.
Test-WTVersion [<CommonParameters>]
Because Windows Terminal can update in the background, you may not be aware that you are running a newer version. An updated version might offer new features to enable in your settings file or things that you have to change. This command will compare the currently installed version with saved information from the last time the command was run. If the Windows Terminal version is newer, this command returns True. This function writes a small json file to $Home.
PS C:\> Test-WTVersion
False
Windows Terminal has not changed since the last check.
PS C:\> if ( $env:wt_session -AND Test-WTVersion) {
Write-Host "A newer version of Windows Terminal is now installed." -foreground Yellow
Start-Process https://github.com/microsoft/terminal/releases
}
Because Windows Terminal can silently update, it may be awkward to know if you are running a new version. You might use the Test-WTVersion
command in your PowerShell profile script with this code snippet.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/