# Error when using update-dscconfiguration

**URL:** <https://forums.powershell.org/t/error-when-using-update-dscconfiguration/8510>\
**Category:** DSC\
**Created:** [April 26, 2017, 8:13am UTC](https://forums.powershell.org/t/error-when-using-update-dscconfiguration/8510 "2017-04-26T08:13:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dylandesmedt](https://avatars.discourse-cdn.com/v4/letter/d/b5e925/32.png) [@dylandesmedt](https://forums.powershell.org/u/dylandesmedt)\
**Post date:** [April 26, 2017, 8:13am UTC](https://forums.powershell.org/t/error-when-using-update-dscconfiguration/8510/1 "2017-04-26T08:13:06Z")

</div>

I am having a problem with the update-dscconfiguration. I can register my node to the pullserver but it won’t get the configurationfile. I think this is caused by the same issue of update-dscconfiguration with the following error:  
The attempt to ‘get an action’ for AgentId 153B0A2D-2A68-11E7-9662-000C2936433B from server URL [https://d](https://d)  
sc-server///PsDscPullserver.svc/Nodes(AgentId=‘153B0A2D-2A68-11E7-9662-000C2936433B’)/GetDscAction  
failed with server error ‘ResourceNotFound(404)’.  
For further details see the server error message below or the DSC debug event log with ID 4339.  
ServerErrorMessage:- ‘The assigned configuration ‘Webservice’ is not found in the pull server  
configuration repository.’

I’m Working with a HTTPS pullserver with WMF5.

Pullserver script:  
Configuration PullServer {  
param  
(  
[string]$computerName = “localhost”,  
[ValidateNotNullOrEmpty()]  
[string]$certificateThumbPrint,  
[ValidateNotNullOrEmpty()]  
[string]$RegistrationKey  
)  
Import-DSCResource -ModuleName xPSDesiredStateConfiguration  
Import-DSCResource -ModuleName PSDesiredStateConfiguration

```
    # Load the Windows Server DSC Service feature
    Node $computerName 
    {
      WindowsFeature DSCServiceFeature
    {
      Ensure = 'Present'
      Name = 'DSC-Service'
    }

    # Use the DSC Resource to simplify deployment of the web service
    xDSCWebService PSDSCPullServer
    {
      Ensure = 'Present'
      EndpointName = 'PSDSCPullServer'
      Port = 443
      PhysicalPath = "$env:SYSTEMDRIVE\inetpub\wwwroot\PSDSCPullServer"
      CertificateThumbPrint = $certificateThumbPrint
      ModulePath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules"
      ConfigurationPath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration"
      State = 'Started'
      DependsOn = '[WindowsFeature]DSCServiceFeature'
      UseSecurityBestPractices = $false
    }

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

```

}

#$guid = [guid]::NewGuid()  
$guid = ‘regkey’  
$cert = Get-ChildItem Cert:\LocalMachine\My  
$filepath = 'C:\Program Files\WindowsPowerShell\DscService\Configuration\PullServer'  
PullServer -RegistrationKey $guid -certificateThumbPrint $cert.Thumbprint -OutputPath $filepath  
New-DscChecksum -Path $filepath  
Start-DscConfiguration -Path $filepath -wait -Verbose -Force

LCM configuration file:  
[DSCLocalConfigurationManager()]

Configuration LCM\_Pull {

```
Node localhost {

    Settings {
        ConfigurationMode = 'ApplyAndAutoCorrect'
        RefreshMode = 'Pull'
        ConfigurationModeFrequencyMins = 15
        RebootNodeIfNeeded = $true
    }

    ConfigurationRepositoryWeb PullServer {
        ServerURL = 'https://DSC-Server/PsDscPullserver.svc'
        AllowUnsecureConnection = $false
        RegistrationKey = 'regkey'
        ConfigurationNames = @('Webservice')
    }

    ResourceRepositoryWeb PullServerModules {
        ServerURL = 'https://DSC-Server/PsDscPullserver.svc'
        AllowUnsecureConnection = $false
        RegistrationKey = 'regkey'
    }
}

```

}

LCM\_Pull -OutputPath "$env:SystemDrive\DscConfiguration"  
Set-DscLocalConfigurationManager -Path "$env:SystemDrive\DscConfiguration" -Verbose -ComputerName localhost -Force

---

<div class="post-metadata">

**Author:** ![noldus](https://avatars.discourse-cdn.com/v4/letter/n/7993a0/32.png) [@noldus](https://forums.powershell.org/u/noldus)\
**Post date:** [April 26, 2017, 9:01am UTC](https://forums.powershell.org/t/error-when-using-update-dscconfiguration/8510/2 "2017-04-26T09:01:26Z")

</div>

In your Example it seems that you use a configuration names in your LCM Script.  
So make sure that on your pull server your mof and checksum have the same name like your configuration names.

In /dsc/configurations/, you should have this files Webservice.mof and .checksum .

Thank’s

---

<div class="post-metadata">

**Author:** ![dylandesmedt](https://avatars.discourse-cdn.com/v4/letter/d/b5e925/32.png) [@dylandesmedt](https://forums.powershell.org/u/dylandesmedt)\
**Post date:** [April 26, 2017, 9:06am UTC](https://forums.powershell.org/t/error-when-using-update-dscconfiguration/8510/3 "2017-04-26T09:06:38Z")

</div>

Hello Arnold,

I got the folder ‘Webservice’ located at C:\Program Files\WindowsPowershell\DscService\Configuration.  
This folder contains both ‘Webservice.mof’ and the ‘Webservice.mof.checksum’ file.

I can’t seem to find the solution, Thanks in advance!

---

<div class="post-metadata">

**Author:** ![noldus](https://avatars.discourse-cdn.com/v4/letter/n/7993a0/32.png) [@noldus](https://forums.powershell.org/u/noldus)\
**Post date:** [April 26, 2017, 9:08am UTC](https://forums.powershell.org/t/error-when-using-update-dscconfiguration/8510/4 "2017-04-26T09:08:21Z")

</div>

copy the content of your folder and paste them directly in C:\Program Files\WindowsPowershell\DscService\Configuration

It should work

---

<div class="post-metadata">

**Author:** ![dylandesmedt](https://avatars.discourse-cdn.com/v4/letter/d/b5e925/32.png) [@dylandesmedt](https://forums.powershell.org/u/dylandesmedt)\
**Post date:** [April 26, 2017, 9:10am UTC](https://forums.powershell.org/t/error-when-using-update-dscconfiguration/8510/5 "2017-04-26T09:10:20Z")

</div>

Thanks so much this works! I’ve been looking for ages!

---

<div class="post-metadata">

**Author:** ![noldus](https://avatars.discourse-cdn.com/v4/letter/n/7993a0/32.png) [@noldus](https://forums.powershell.org/u/noldus)\
**Post date:** [April 26, 2017, 9:13am UTC](https://forums.powershell.org/t/error-when-using-update-dscconfiguration/8510/6 "2017-04-26T09:13:25Z")

</div>

You are welcome. 😉

---

<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:16pm UTC](https://forums.powershell.org/t/error-when-using-update-dscconfiguration/8510/7 "2024-05-16T21:16:41Z")

</div>


