dsccommunity / xRemoteDesktopSessionHost

This module contains DSC resources for the management and configuration of Microsoft Remote Desktop Session Host (RDSH).
MIT License
36 stars 47 forks source link

Deployment ends in failure when executing on windows server 2016 #23

Closed KennethVerbeure closed 6 years ago

KennethVerbeure commented 6 years ago

my dsc-configuration fails on following error:

RD Connection Broker Configuration Failed on AWINGU-APP-1.ALLIESANDMORRISON.CO.UK With Error: The RD Connection Broker cannot be joined to the RD Management server.

When i go and look at my server it seems like everything was configuration as i wanted it.

I have a production deployment where i have an older version of this module (2014) where i install on a windows server 2012 and there i do not have this problem.

Any idea why i would have this error? My azure arm deployments cannot continue because this configuration fails

following is my configuration:

configuration CreateAppServer
{
    param
    (
        [Parameter(Mandatory)]
        [String]$DnsServerAddress,
        [Parameter(Mandatory)]
        [String]$MachineName,
        [Parameter(Mandatory)]
        [String]$DomainName,
        [Parameter(Mandatory)]
        [PSCredential]$AdminCreds
    )

    Import-DscResource -ModuleName xComputerManagement, xRemoteDesktopSessionHost
    [PSCredential]$DomainCreds = New-Object System.Management.Automation.PSCredential("${DomainName}\$($AdminCreds.UserName)", $AdminCreds.Password)
    [String]$localhost = [System.Net.Dns]::GetHostByName((hostname)).HostName
    [String]$collectionName = 'firstcollection'
    [String]$collectionDescription = 'My first collection'
    [String]$commandLineParameter = '/v:' + $DnsServerAddress

    Node localhost
    {
        LocalConfigurationManager
        {
            ConfigurationMode = 'ApplyOnly'
            ActionAfterReboot = 'ContinueConfiguration'
            RebootNodeIfNeeded = $true
        }

        WindowsFeature Remote-Desktop-Services
        {
            Ensure = "Present"
            Name = "Remote-Desktop-Services"
            DependsOn = "[xComputer]JoinDomain"
        }

        WindowsFeature RDS-RD-Server
        {
            Ensure = "Present"
            Name = "RDS-RD-Server"
            DependsOn = "[xComputer]JoinDomain"
        }

        WindowsFeature RDS-Connection-Broker
        {
            Ensure = "Present"
            Name = "RDS-Connection-Broker"
            DependsOn = "[xComputer]JoinDomain"
        }

        WindowsFeature RDS-Licensing
        {
            Ensure = "Present"
            Name = "RDS-Licensing"
            DependsOn = "[xComputer]JoinDomain"
        }

        WindowsFeature RDS-Web-Access
        {
            Ensure = "Present"
            Name = "RDS-Web-Access"
            DependsOn = "[xComputer]JoinDomain"
        }

        xRDSessionDeployment Deployment
        {
            SessionHost = $localhost
            ConnectionBroker = $localhost
            WebAccessServer = $localhost
            DependsOn = "[WindowsFeature]Remote-Desktop-Services", "[WindowsFeature]RDS-RD-Server"
        }

        xRDSessionCollection Collection
        {
            CollectionName = $collectionName
            CollectionDescription = $collectionDescription
            SessionHost = $localhost
            ConnectionBroker = $localhost
            DependsOn = "[xRDSessionDeployment]Deployment"
        }

        xRDSessionCollectionConfiguration CollectionConfiguration
        {
            CollectionName = $collectionName
            CollectionDescription = $collectionDescription
            ConnectionBroker = $localhost
            TemporaryFoldersDeletedOnExit = $false
            AuthenticateUsingNLA = $false
            DisconnectedSessionLimitMin = 1
            BrokenConnectionAction = "Disconnect"
            DependsOn = "[xRDSessionCollection]Collection"
        }

        xRDRemoteApp Notepad
        {
            CollectionName = $collectionName
            DisplayName = "Notepad"
            FilePath = "C:\Windows\System32\notepad.exe"
            Alias = "notepad"
            CommandLineSetting = "Allow"
            DependsOn = "[xRDSessionCollection]Collection"
        }

        xRDRemoteApp Mstsc
        {
            CollectionName = $collectionName
            DisplayName = "Remote Desktop Connection"
            FilePath = "C:\Windows\System32\mstsc.exe"
            Alias = "mstsc"
            CommandLineSetting = "Require"
            RequiredCommandLine = $commandLineParameter
            DependsOn = "[xRDSessionCollection]Collection"
        }
    }
}
johlju commented 6 years ago

@KennethVerbeure Sorry that you didn't get an answer for so long. Not sure this is relevant any longer. But did you get this working, or is this still a problem?

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.

stale[bot] commented 6 years ago

This issue has been automatically closed because it is has not had activity from the community in the last 40 days.