function Test-IsMacOSPlatform { <# .SYNOPSIS Returns true if the platform is macOS #> [CmdletBinding()] [OutputType([bool])] param ( ) if (Test-IsUnixPlatform) { return $PSVersionTable.OS -match "Darwin" } return $false }