You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionQueryNodeInformation
{
Param (
[string] $Uri="http://localhost:7070/PSDSCComplianceServer.svc/Status",
[string] $ContentType="application/json"
)
Write-Host"Querying node information from pull server URI = $Uri"-ForegroundColor Green
Write-Host"Querying node status in content type = $ContentType"-ForegroundColor Green
$response=Invoke-WebRequest-Uri $Uri-Method Get -ContentType $ContentType-UseDefaultCredentials -Headers @{Accept=$ContentType}
if($response.StatusCode-ne200)
{
Write-Host"node information was not retrieved."-ForegroundColor Red
}
$jsonResponse=ConvertFrom-Json$response.Contentreturn$jsonResponse
}
To get this to work, I had to create an http binding listening for requests on localhost:9081 on the PSDSCComplianceServer site. We can use this to pull the status code, heartbeat, last runtime, etc. Tie this in with a SNS or other notification system and we can follow client provisioning to ensure it does not fail.
We need a cmdlet that would go over all key areas of the pull server config and report any anomalies to speed up troubleshooting in the future.
The text was updated successfully, but these errors were encountered: