function Test-IsWindowsDesktop { <# .SYNOPSIS Returns true if the platform is Windows and this is a desktop capable OS #> [CmdletBinding()] [OutputType([bool])] param ( ) return (Test-IsWindowsPlatform) -and ($PSVersionTable.PSEdition -eq 'Desktop') }