Created
November 9, 2017 23:27
-
-
Save Chiliyago/7fcc05b4c3ed439c9d5ab86c5954f581 to your computer and use it in GitHub Desktop.
Failed Registration of DSC Agent with Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$configData = @{ | |
AllNodes = @( | |
@{ | |
NodeName = "*" | |
PullServerURL = "https://dc1.MyDomain.com:8080/PSDSCPullServer.svc" | |
CertificateID = "CD0D4E9F2474A23DF935A232A5387ED22494B86B" | |
RefreshMode = "PULL" | |
ConfigurationMode = "ApplyAndAutocorrect" | |
AllowModuleOverwirte = $true | |
RebootNodeIfNeeded = $true | |
}, | |
@{ | |
NodeName = "SP-APP1" | |
Roles = @("Target") | |
RegistrationKey="bf195c96-6128-478f-950b-90f4bcbd4fa3" | |
} | |
) | |
} | |
[DscLocalConfigurationManager()] | |
Configuration DSCTargetNodeLCM{ | |
Node $AllNodes.Where({ $_.Roles -contains 'Target' }).NodeName | |
{ | |
Settings{ | |
RefreshMode = $Node.RefreshMode | |
RefreshFrequencyMins = 30 | |
ConfigurationMode = $Node.ConfigurationMode | |
ConfigurationModeFrequencyMins = 60 | |
CertificateID = $Node.CertificateID | |
RebootNodeIfNeeded = $Node.RebootNodeIfNeeded | |
AllowModuleOverwrite = $Node.AllowModuleOverwirte | |
} | |
ConfigurationRepositoryWeb ConfigurationManager{ | |
ServerURL = $Node.PullServerURL | |
RegistrationKey = $Node.RegistrationKey | |
CertificateId = $Node.CertificateID | |
ConfigurationNames = @('SharePointConfi') | |
} | |
ReportServerWeb ReportManager{ | |
ServerURL = $Node.PullServerURL | |
RegistrationKey = $Node.RegistrationKey | |
CertificateID = $Node.CertificateId | |
AllowUnsecureConnection = $true | |
} | |
} | |
} | |
DSCTargetNodeLCM -ConfigurationData $configData -OutputPath "C:\_DSC\_MOF" | |
Set-DscLocalConfigurationManager -Path "C:\_DSC\_MOF" -Verbose | |
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 SP-APP1 with user sid S-1-5-21-1767221423-1007395993-3978284636-500. | |
VERBOSE: [SP-APP1]: LCM: [ Start Set ] | |
VERBOSE: [SP-APP1]: LCM: [ Start Resource ] [MSFT_DSCMetaConfiguration] | |
VERBOSE: [SP-APP1]: LCM: [ Start Set ] [MSFT_DSCMetaConfiguration] | |
VERBOSE: [SP-APP1]: LCM: [ End Set ] [MSFT_DSCMetaConfiguration] in 0.0080 seconds. | |
VERBOSE: [SP-APP1]: LCM: [ End Resource ] [MSFT_DSCMetaConfiguration] | |
VERBOSE: [SP-APP1]: LCM: [ End Set ] | |
Registration of the Dsc Agent with the server https://dc1.MyDomain.com:8080/PSDSCPullServer.svc failed. The underlying error is: The attempt to register Dsc Agent with AgentId | |
9167A3EA-3674-11E7-80D4-000D3A34F962 with the server https://dc1.MyDomain.com:8080/PSDSCPullServer.svc/Nodes(AgentId='9167A3EA-3674-11E7-80D4-000D3A34F962') returned unexpected response code Unauthorized. . | |
+ CategoryInfo : InvalidResult: (root/Microsoft/...gurationManager:String) [], CimException | |
+ FullyQualifiedErrorId : RegisterDscAgentUnsuccessful,Microsoft.PowerShell.DesiredStateConfiguration.Commands.RegisterDscAgentCommand | |
+ PSComputerName : SP-APP1 | |
VERBOSE: Operation 'Invoke CimMethod' complete. | |
VERBOSE: Set-DscLocalConfigurationManager finished in 0.241 seconds. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment