Author Posts

June 15, 2017 at 10:05 am

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 :-

[DSCLocalConfigurationManager()]

Configuration LCMPULLV2

{
Node localhost
{
Settings
{
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'
}

}
}
LCMPULLV2
Set-dscLocalConfigurationManager localhost -path .\LCMPULLV2 -verbose

On the clinet if I type this into abrowser
https://servername301:8080/psdscpullserver.svc
I get this back – which is fine as far as I know.

Default

Configurations

Modules

Action

Module

StatusReport

Node

Reports

Nodes

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
http://servername:8080/psdscreportserver.svc/nodes(agentid='abcdefgh-1234-5678-1234-1234567890')/reports
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?

June 15, 2017 at 12:14 pm

Thanks
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.

June 16, 2017 at 9:03 am

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.

July 3, 2017 at 1:27 pm

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

https://servername:8080/PSDSCReportServer.svc/Nodes(AgentId='A14CEF0A-5D20-11E7-9666-005056936F34')/Reports

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

July 3, 2017 at 1:36 pm

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.

July 3, 2017 at 2:57 pm

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.

July 4, 2017 at 11:18 am

Sylvain – Do you have a link to that github ticket? Tried to find it but can only find closed tickets regarding this.

July 4, 2017 at 1:39 pm

As they say in the thread, maybe time to look att the TUG Pullserver.

July 17, 2017 at 8:25 pm

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?

July 18, 2017 at 3:54 pm

[removed, posted in wrong thread]

July 19, 2017 at 11:38 am

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.

July 25, 2017 at 6:00 pm

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