function Test-IsProductionEnvironment { <# .SYNOPSIS Determine if this environment is configured as a production environment .PARAMETER ComputerName What computer do we check, defaults to localhost #> [CmdletBinding()] [OutputType([System.Boolean])] param ( [string]$ComputerName = 'localhost' ) $environmentType = (Get-EnvironmentType -ComputerName $ComputerName) $environmentTypeNames = @('Production', 'LoadTest', 'Staging') return ($environmentTypeNames -contains $environmentType) }