# Registration of the Dsc Agent with the server failed

**URL:** <https://forums.powershell.org/t/registration-of-the-dsc-agent-with-the-server-failed/15425>\
**Category:** DSC\
**Created:** [December 23, 2020, 11:36am UTC](https://forums.powershell.org/t/registration-of-the-dsc-agent-with-the-server-failed/15425 "2020-12-23T11:36:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kalis123](https://avatars.discourse-cdn.com/v4/letter/k/a88e4f/32.png) [@kalis123](https://forums.powershell.org/u/kalis123)\
**Post date:** [December 23, 2020, 11:36am UTC](https://forums.powershell.org/t/registration-of-the-dsc-agent-with-the-server-failed/15425/1 "2020-12-23T11:36:09Z")

</div>

Hello,

Setting up the DSC pull server and the node for the first time and I am hitting an error that I couldn’t solve. Please help.

**Server configuration**

Server in Azure

```
configuration Sample_xDscWebServiceRegistration
{
    param
    (
        [string[]]$NodeName = 'localhost',

        [ValidateNotNullOrEmpty()]
        [string] $certificateThumbPrint,

        [Parameter(HelpMessage='This should be a string with enough entropy (randomness) to protect the registration of clients to the pull server. We will use new GUID by default.')]
        [ValidateNotNullOrEmpty()]
        [string] $RegistrationKey # A guid that clients use to initiate conversation with pull server
    )

    Import-DSCResource -ModuleName PSDesiredStateConfiguration
    Import-DSCResource -ModuleName xPSDesiredStateConfiguration

    Node $NodeName
    {
        WindowsFeature DSCServiceFeature
        {
            Ensure = "Present"
            Name = "DSC-Service"
        }

        xDscWebService PSDSCPullServer
        {
            Ensure = "Present"
            EndpointName = "PSDSCPullServer"
            Port = 443
            PhysicalPath = "$env:SystemDrive\inetpub\PSDSCPullServer"
            CertificateThumbPrint = $certificateThumbPrint
            ModulePath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules"
            ConfigurationPath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration"
            State = "Started"
            DependsOn = "[WindowsFeature]DSCServiceFeature"
            RegistrationKeyPath = "$env:PROGRAMFILES\WindowsPowerShell\DscService"
            AcceptSelfSignedCertificates = $true
            UseSecurityBestPractices = $true
            Enable32BitAppOnWin64 = $false
        }

        File RegistrationKeyFile
        {
            Ensure = 'Present'
            Type = 'File'
            DestinationPath = "$env:ProgramFiles\WindowsPowerShell\DscService\RegistrationKeys.txt"
            Contents = $RegistrationKey
        }
    }
}
```

PS C:\Program Files\WindowsPowerShell\DscService\Configuration\> Get-DscConfigurationStatus

Status StartDate Type Mode RebootRequested NumberOfResources

* * *

Success 12/23/2020 9:05:38 PM Consistency PUSH False 3

Also created the testconfig.mof and the corresponding .checksum under the DSCService\Configurations folder

**Client configuration**

Test client machine - local desktop

Created the metamof using this configuration

```
[DSCLocalConfigurationManager()]
configuration PullClientConfigNames
{
    Node localhost
    {
        Settings
        {
            RefreshMode = 'Pull'
            RefreshFrequencyMins = 30
            ConfigurationMode = 'ApplyAndAutoCorrect'
            RebootNodeIfNeeded = $true
        }
        ConfigurationRepositoryWeb dsc-test
        {
            ServerURL = 'https://dsc-test.preprod.com/PSDSCPullServer.svc/'
            AllowUnsecureConnection = $true
            RegistrationKey = 'fc2a988a-aacf-4c6e-a388-fdd0c42338a8'
            ConfigurationNames = @('testconfig')
        }
    }
}
PullClientConfigNames
```

When running the command

Set-DscLocalConfigurationManager -Path .\PullClientConfigNames -Verbose

Getting the below error message

VERBOSE: Performing the operation “Start-DscConfiguration: SendMetaConfigurationApply” on target “MSFT\_DSCLocalConfigurationManager”.  
VERBOSE: Perform operation ‘Invoke CimMethod’ with following parameters, ‘‘methodName’ = SendMetaConfigurationApply,‘className’ = MSFT\_DSCLocalConfigurationManager,‘namespaceName’ = root/Microsoft/Windows/DesiredStateConfiguration’.  
VERBOSE: An LCM method call arrived from computer desktop-HOME with user sid S-1-5-21-1893490152-1803344854-317642803-1002.  
VERBOSE: [desktop-HOME]: LCM: [Start Set]  
VERBOSE: [desktop-HOME]: LCM: [Start Resource] [MSFT\_DSCMetaConfiguration]  
VERBOSE: [desktop-HOME]: LCM: [Start Set] [MSFT\_DSCMetaConfiguration]  
VERBOSE: [desktop-HOME]: LCM: [End Set] [MSFT\_DSCMetaConfiguration] in 0.0340 seconds.  
VERBOSE: [desktop-HOME]: LCM: [End Resource] [MSFT\_DSCMetaConfiguration]  
VERBOSE: [desktop-HOME]: LCM: [End Set]  
Registration of the Dsc Agent with the server [https://dsc-test.preprod.com/PSDSCPullServer.svc/](https://dsc-test.preprod.com/PSDSCPullServer.svc/) failed. The underlying error is: The PowerShell DSC resource is not a valid Desired State Configuration resource. .

- CategoryInfo : InvalidOperation: (root/Microsoft/…gurationManager:String) , CimException
- FullyQualifiedErrorId : Pull\_Registration\_ManagedPluginFailure
- PSComputerName : localhost

VERBOSE: Operation ‘Invoke CimMethod’ complete.  
VERBOSE: Set-DscLocalConfigurationManager finished in 0.399 seconds.

**Note:** I have the root cert from the pull server copied to the trusted certs on my desktop.

&nbsp;

---

<div class="post-metadata">

**Author:** ![pola34](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@pola34](https://forums.powershell.org/u/pola34)\
**Post date:** [December 30, 2020, 10:41pm UTC](https://forums.powershell.org/t/registration-of-the-dsc-agent-with-the-server-failed/15425/2 "2020-12-30T22:41:11Z")

</div>

[Hotmail Inloggen](https://hot-mailinlogg.nl/)

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 9:14pm UTC](https://forums.powershell.org/t/registration-of-the-dsc-agent-with-the-server-failed/15425/3 "2024-05-16T21:14:13Z")

</div>

Closed on May 16, 2024, 9:14pm UTC


