private/Test-IsWindows.ps1
|
function Test-IsWindows { <# .SYNOPSIS Tests whether the current PowerShell session is running on Windows .DESCRIPTION Converts the PowerShell IsWindows automatic variable to a Boolean and returns the result. The variable is available in PowerShell Core and PowerShell 7. .EXAMPLE PS> Test-IsWindows Tests whether the current PowerShell session is running on Windows. .INPUTS None. This function does not accept pipeline input. .OUTPUTS System.Boolean. Returns the Boolean value of the IsWindows automatic variable. .NOTES Author: David Segura Company: Recast Software Version: 1.0.0 Date: 2026-08-28 #> [OutputType([bool])] param () return [bool]$IsWindows } |