Не удалось зарегистрировать агента DSC

Я пытаюсь настроить DSC Pull и Target Servers. Серверная часть Pull, кажется, работает хорошо, и я могу успешно перейти к https:\\...PSDSCPullServer.svc/$metadata и получите файл XML.

Сейчас я пытаюсь зарегистрировать цель, но нахожу ошибки в выходных данных и в журнале событий DSC Pull Server.

Ошибка журнала событий говорит:

Клиент с необработанным URL-адресом /PSDSCPullServer.svc/Nodes(AgentId='9167A3EA-3674-11E7-80D4-000D3A34F962') указал недопустимый заголовок версии протокола. Поддерживаемый протокол версии составляет 2.0.

Это весь сценарий:

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

0 ответов

Другие вопросы по тегам