Modules/xRemoteDesktopSessionHost.Common/xRemoteDesktopSessionHost.Common.psm1

#Region '.\prefix.ps1' -1

$script:dscResourceCommonModulePath = Join-Path -Path $PSScriptRoot -ChildPath '../DscResource.Common'

Import-Module -Name $script:dscResourceCommonModulePath

$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'
#EndRegion '.\prefix.ps1' 6
#Region '.\Public\Get-xRemoteDesktopSessionHostOsVersion.ps1' -1

function Get-xRemoteDesktopSessionHostOsVersion
{
    [CmdletBinding()]
    [OutputType([System.Version])]
    param ()

    return [Environment]::OSVersion.Version
}
#EndRegion '.\Public\Get-xRemoteDesktopSessionHostOsVersion.ps1' 9
#Region '.\Public\Test-xRemoteDesktopSessionHostOsRequirement.ps1' -1

<#
    .SYNOPSIS
        Verifies that the operating system meets the Remote Desktop Session Host requirement.
 
    .DESCRIPTION
        Returns $true when Get-xRemoteDesktopSessionHostOsVersion reports at least Windows Server 2012 (6.2.9200.0); otherwise returns $false.
 
    .OUTPUTS
        System.Boolean
 
        Indicates whether the OS version is supported.
 
    .EXAMPLE
        Test-xRemoteDesktopSessionHostOsRequirement
 
        Returns $true if the OS is Windows Server 2012 or later, otherwise $false.
#>


function Test-xRemoteDesktopSessionHostOsRequirement
{
    [CmdletBinding()]
    [OutputType([System.Boolean])]
    param ()

    return (Get-xRemoteDesktopSessionHostOsVersion) -ge ([System.Version]::new(6, 2, 9200, 0))
}
#EndRegion '.\Public\Test-xRemoteDesktopSessionHostOsRequirement.ps1' 27