2015-04-28 19 views
1

我试图更新我的DSC部署,现在使用部分配置来分解配置。为此,我需要现在使用拉过程而不是推。能够为2月份的PowerShell设置LCM的CertificateID 5

当我尝试应用配置它看起来像的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.. 

任何想法如何做到这一点?当我在推送模型中使用单个配置时,我使用了证书ID。

回答

相关问题