Возможность установить CertificateID для LCM с февральским powershell 5

Я пытаюсь обновить свое развертывание DSC, чтобы теперь использовать частичные конфигурации для разделения конфигурации. Для этого мне нужно теперь использовать процесс pull вместо push.

Когда я пытаюсь применить конфигурацию для LCM, которая выглядит примерно так:

[DscLocalConfigurationManager()]
Configuration CreateGESService
{
param(
    [Parameter(Mandatory=$true)] 
    [ValidateNotNullorEmpty()] 
    [PsCredential] $InstallCredential,
    [Parameter(Mandatory=$true)] 
    [ValidateNotNullorEmpty()] 
    [PsCredential] $RunCredential
)

Node $AllNodes.NodeName
{

    $hostVersion = (get-host).Version
    # changed how the possible values for debugMode in the February build
    if (($hostVersion.Major -ge 5) -and ($hostVersion.Minor -ge 0) -and ($hostVersion.Build -ge 9842)){
        $debugMode = 'All'
    }
    else{
        $debugMode = $true
    }
    #setup the localConfigManager
    Settings 
    {
         #CertificateID = $node.Thumbprint
         # slower performance - and only available WMF5
         # now we need to kill the dsc
         DebugMode = $debugMode
         ConfigurationMode = 'ApplyAndAutoCorrect'
         ConfigurationModeFrequencyMins = '15'
         AllowModuleOverwrite = $true
         RefreshMode = 'Push'
         ConfigurationID = $node.ConfigurationID
    }

    PartialConfiguration GetEventStoreConfiguration {
        Description = "Contains the stuff for GetEventStore Being Installed"
        ConfigurationSource = "[ConfigurationRepositoryShare]ConfigSource"
        RefreshMode = "Pull"
    }

    PartialConfiguration ExternalIntegrationConfiguration{
        Description = "Contains the stuff for External Integration"
        ConfigurationSource = "[ConfigurationRepositoryShare]ConfigSource"
        DependsOn = '[PartialConfiguration]GetEventStoreConfiguration'
        RefreshMode = "Pull"
    }

    PartialConfiguration ServeGroupSpike{
        Description = "Contains the stuff for External Integration"
        ConfigurationSource = "[ConfigurationRepositoryShare]ConfigSource"
        DependsOn = '[PartialConfiguration]ExternalIntegrationConfiguration'
        RefreshMode = "Pull"
    }

    ConfigurationRepositoryShare ConfigSource{
        SourcePath = "\\someServer\Shared\dscService\Configuration"
        Credential = $InstallCredential
    }

    ResourceRepositoryShare ResourceSource{
        SourcePath = "\\someServer\Shared\dscService\Resources"
        Credential = $InstallCredential
    }
}

Если я попытаюсь включить CertificateID, я получаю сообщение об ошибке, например:

The property CertificateID of metaconfiguration is not compatible with the current version 2.0.0 of the configuration
document. This property only works with version greater than or equal to 1.0.0 . In case the version is greater, then
the property MinimumCompatibleVersion should be set to atleast 1.0.0 . Set these properties in the
OMI_ConfigurationDocument instance in the document and try again.
    + CategoryInfo          : InvalidArgument: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 4
    + PSComputerName        : SGSpike-Main

Естественно, когда конфигурация пытается быть применена, она не может расшифровать переданные учетные данные, и я получаю сообщение об ошибке в представлении событий, например:

Job {B37D5239-EDBA-11E4-80C2-00155D9ACA1F} : 
WarningMessage An error occured while applying the partial configuration [PartialConfiguration]ExternalIntegrationConfiguration. The error message is : 
The Local Configuration Manager is not configured with a certificate. Resource '[File]GpgProgram' in configuration 'ExternalIntegrationConfiguration' cannot be processed..

Любые идеи, как это сделать? У меня это работало с идентификатором сертификата, когда я использовал одну конфигурацию в модели push.


person Karl    schedule 28.04.2015    source источник


Ответы (1)


Даже после падения в апреле 2015 года проблема все еще существует. Дальнейшая диагностика показывает, что вы можете:

  1. Не использовать частичные конфигурации
  2. Не использовать сертификат для шифрования учетных данных

Открыта проблема с подключением (с некоторыми дополнительными сведениями) по адресу https://connect.microsoft.com/PowerShell/Feedback/Details/1292678

person Karl    schedule 01.05.2015