Skip to content

xRDGatewayConfiguration fails with Get-RDDeploymentGatewayConfiguration' is not recognized as the name of a cmdlet, function, script file, or operable #97

@ghost

Description

Details of the scenario you tried and the problem that is occurring

Verbose logs showing the problem

Suggested solution to the issue

The DSC configuration that is used to reproduce the issue (as detailed as possible)

Configuration RDS
{
  param (
    [parameter(Mandatory = $true)]
    [string]$MachineName = 'localhost',
    
    [parameter(Mandatory = $true)]
    [string]$fqdm,

    [parameter(Mandatory = $true)]
    [string]$url,

    [parameter(Mandatory = $true)]
    [string]$thumbPrint
    )

    Import-DscResource -ModuleName xRemoteDesktopSessionHost -ModuleVersion 2.0.0

  
  Node $MachineName
  {

    LocalConfigurationManager
    {
        RebootNodeIfNeeded = $true
        ConfigurationMode = "ApplyOnly"
    }

    #Install the IIS Role
    WindowsFeature SessionHost {
 
      Name   = 'RDS-RD-Server'
      Ensure = 'Present'
    }

    #install web access role
    windowsFeature WebAccess {
        name = 'rds-web-access'
        Ensure = 'present'
    }

    windowsFeature broker {
        name = 'rds-connection-broker'
        ensure = 'present'
    }
    
    windowsFeature gateway {
        name = 'rds-gateway'
        ensure = 'present'
    }
    windowsFeature RDLicensing {
      Name = 'rds-licensing'
      Ensure = 'Present'
    }


    xRDSessionDeployment NewDeployment {
 
      ConnectionBroker = $fqdm
      SessionHost = $fqdm
      WebAccessServer = $fqdm
      DependsOn = '[windowsFeature]WebAccess'
      }
      xRDSessionCollection collection {
       
      CollectionName = 'QuickSessionCollection'
      SessionHost = $fqdm
      ConnectionBroker = $fqdm
      DependsOn = '[xRDSessionDeployment]NewDeployment'
      }
       
      xRDSessionCollectionConfiguration collectionconfig {
       
      CollectionName = 'QuickSessionCollection'
      ConnectionBroker = $fqdm
      AutomaticReconnectionEnabled = $true
      BrokenConnectionAction = 'Disconnect'
      UserGroup = 'Domain Users'
      DependsOn = '[xRDSessionCollection]collection'
      TemporaryFoldersDeletedOnExit = $true
      SecurityLayer = 'Negotiate'
      EncryptionLevel = 'ClientCompatible'
      AuthenticateUsingNLA = $true
      }

      xRDLicenseConfiguration licenseconfig {

        ConnectionBroker = $fqdm
        LicenseServer = $fqdm
        LicenseMode = 'PerUser'
        DependsOn = '[xRDSessionCollectionConfiguration]collectionconfig'
        }

      xRDGatewayConfiguration GatewayConfig {

        DependsOn = '[xRDSessionCollectionConfiguration]collectionconfig','[windowsFeature]gateway'
        ConnectionBroker = $fqdm
        GatewayServer = $fqdm
        GatewayMode = 'Custom'
        LogonMethod = 'Password'
        UseCachedCredentials = $true
        BypassLocal = $false
        ExternalFqdn = $url
      }

      script CustomScript {
        
        DependsOn = '[xRDGatewayConfiguration]GatewayConfig','[WindowsFeature]broker'
        GetScript            =  { return @{result = 'result'} }
        TestScript           = { return $false }
        SetScript            = {
          Import-Module -Name RemoteDesktop -Global
          $roles=@(
          'RDWebAccess'
          'RDPublishing'
          'RDRedirector'
          'RDGateway'
          )
                  
          foreach($role in $roles){
          
            Set-RDCertificate -role $role -Thumbprint $using:thumbPrint  -ConnectionBroker $using:fqdm -force
          }
      }
    }
  } 
}

The operating system the target node is running

Version and build of PowerShell the target node is running

Version of the DSC module that was used

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThe issue is an enhancement request.good first issueThe issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHubhelp wantedThe issue is up for grabs for anyone in the community.high priorityThe issue or PR should be resolved first. It is of less priority than the label 'Blocking Release'.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions