function Test-IsWindowsPlatform { <# .SYNOPSIS Returns true if the platform is Windows #> [CmdletBinding()] [OutputType([bool])] param ( ) return @([System.PlatformID]::Win32NT,[System.PlatformID]::Win32Windows,[System.PlatformID]::Win32S).Contains([System.Environment]::OSVersion.Platform) }