DSC Not able to get reporting working on IIS Pull server

This topic contains 13 replies, has 5 voices, and was last updated by  Nitin Gupta 11 months ago.

  • Author
  • #72910


    Struggling with this.
    have a IIS Pull Server running on WS2016.
    I have a client running 2012R2 .
    All appears to be working in that the configuration that i have set up (which ensures that one service is set to running and one registry key is present) are taking effect on the client. i.e. if I remove the registry key , DSC will ensure that the key is putback.
    Now I would like to be able to report on this as I understand a IIS Pull Server can do this, however this does not appear to be working. I'll reiterate that the DSC mechanism itself does appear to be working, it's just the reporting side that I'm stuck with.
    Let me expand on this.
    the client configuration file looks like this :-


    Configuration LCMPULLV2

    Node localhost
    RefreshMode = 'Pull'
    RefreshFrequencyMins = 30
    RebootNodeIfNeeded = $false
    ConfigurationMode = "ApplyandAutoCorrect"
    ConfigurationRepositoryWeb servername301
    ServerURL = 'https://servername301:8080/PSDSCPullServer.svc'
    RegistrationKey = 'abcdefg-1234-5678-1234-1234567890'
    ConfigurationNames = @('DomainControllerDSCConfig')
    ReportServerWeb uspmvmgt301
    ServerURL = 'https://servername301:8080/PSDSCPullServer.svc'
    RegistrationKey = 'abcdefg-1234-5678-1234-1234567890'

    Set-dscLocalConfigurationManager localhost -path .\LCMPULLV2 -verbose

    On the clinet if I type this into abrowser
    I get this back – which is fine as far as I know.










    If I run
    PS C:\windows\system32> get-dsclocalconfigurationmanager

    ActionAfterReboot : ContinueConfiguration
    AgentId : abcdfgh-1234-5678-1234-1234567890
    AllowModuleOverWrite : False
    CertificateID :
    ConfigurationDownloadManagers : {[ConfigurationRepositoryWeb]servername301}
    ConfigurationID :
    ConfigurationMode : ApplyAndAutoCorrect
    ConfigurationModeFrequencyMins : 15
    Credential :
    DebugMode : {NONE}
    DownloadManagerCustomData :
    DownloadManagerName :
    LCMCompatibleVersions : {1.0, 2.0}
    LCMState : Idle
    LCMStateDetail :
    LCMVersion : 2.0
    StatusRetentionTimeInDays : 10
    PartialConfigurations :
    RebootNodeIfNeeded : False
    RefreshFrequencyMins : 30
    RefreshMode : Pull
    ReportManagers : {[ReportServerWeb]servername301}
    ResourceModuleManagers : {}
    PSComputerName :

    and then type the following into the browser
    i get a page cannot be displayed
    if I try the same with https I get a HTTp404. the resource cannto be found.

    Any suggestion on what to try? pointers as to where to look?

  • #72917

  • #72920


    Yes that was a typo, but retried none the less and it still failed.
    Some additional information
    the event log (desired state configuration section) is logging :-
    event id 4266
    Job {7F701ACC-51C0-11E7-80BD-0050569E2DAC} :
    Successfully sent the status report using Report Manager WebDownloadManager.

    Event id 4264
    Job {7F701ACC-51C0-11E7-80BD-0050569E2DAC} :
    WebReportManager for agent DD8E11D9-5030-11E7-80BD-0050569E2DAC Send-DscStatus command succeeded.

    Event id 4262
    Job {7F701ACC-51C0-11E7-80BD-0050569E2DAC} :
    WebReportManager for agent 12345678-1234-5678-1234-12434567890 Send-DscStatus command, POST Url: PSDSCPullServer.svc/Nodes(AgentId='DD8E11D9-5030-11E7-80BD-0050569E2DAC')/SendReport.

    This suggests to me that the information IS being sent to the report server on the pull servers, its just trying to get that informationout that I'm struggling with.

  • #73033


    I noticed that I have the same problems In my dev environment. In my case both Pull server and Client is running on Windows 2016.
    I will do some troubleshooting when I have the time.

  • #74131


    Anyone found anything? I have the same exact issue. The node reports that it registered correctly and sent reports, but I cannot pull those reports from the report server url, I get a "resource cannot be found"

    On the pull/report server I try this url


    and I always get a 404. Event viewer event confirm that reports were sent successfully though

  • #74135


    Found my answer in a github ticket, and looking carefully at the event viewer events also show the answer.

    Using xWebservice to setup the DSC pull server creates the Reportserver at the same url. Meaning the correct url is https://servername:8080/PSDSCPullServer.svc/Nodes(AgentId='A14CEF0A-5D20-11E7-9666-005056936F34')/Reports

    Totally confusing as all the microsoft doc use PSDSCReportServer.svc in it's exemples.

  • #74156


    Interesting, in fact I've tried both PSDSCPULLSERVER.SVC and PSDSCREPORTSERVER .
    the report server fails very quickly with a resource cannto be found HTTP404
    the PSDSCPULLServer however takes along time before stating the page cannto be found.

    I have a call outstanidng with MS at th emoment to see if they can throw any light on it.

  • #75163


    I was following this thread and I did notice exact same thing the reporting URL being the same when using xWebservice to setup the pull server. but I'm trying with the correct one and it's still failing.

    https://url_of_pull_server/PSDSCPullServer.svc/nodes(agentid='GUID of one of the nodes')/reports

    And the reply I'm getting is:

    Resource not found for the segment 'nodes'.

    Anyone know how to get this right?

    • #75199


      [removed, posted in wrong thread]

    • #75224


      I still have the issue outstanding with Microsoft at the moment. they have managed to recreate the issue which is good in that it proves it's hopefully not user error on my part.
      havce provided many diagnostics for them.
      Will post answer once I have it.

  • #75845

    Nitin Gupta

    Can you try the following to remove the possibility of using wrong formatted URL etc.:

    # function to get Reports
        function GetReport
            param($AgentId = "$((glcm).AgentId)", $serviceURL = "http://localhost:8080/PSDSCPullServer/PSDSCPullserver.svc")
            $request = Invoke-WebRequest -Uri "$serviceURL/Nodes(AgentId='$AgentId')/Reports"   -ContentType "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" `
                       -UseBasicParsing -Headers @{Accept = "application/json";ProtocolVersion = "2.0"} 
            $object = ConvertFrom-Json $request.content
            return $object.value
    GetReport -AgentId   # by default it will use current node's agent ID

You must be logged in to reply to this topic.