# Encrypting Credentials - Production Preview

**URL:** <https://forums.powershell.org/t/encrypting-credentials-production-preview/4821>\
**Category:** DSC\
**Created:** [September 3, 2015, 3:43pm UTC](https://forums.powershell.org/t/encrypting-credentials-production-preview/4821 "2015-09-03T15:43:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul-kimber](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@paul-kimber](https://forums.powershell.org/u/paul-kimber)\
**Post date:** [September 3, 2015, 3:43pm UTC](https://forums.powershell.org/t/encrypting-credentials-production-preview/4821/1 "2015-09-03T15:43:48Z")

</div>

Hi,

Using the latest production preview I’m trying to set-up credential protection using DSC’s in-build mechanism. I’m using a self-signed certificate and encrypting with the public key on the machine building the MOF. The target instance has the certificate installed in Cert:\LocalMachine\My and has the private key available. My target instance is configured as follows.

`
 [DscLocalConfigurationManager()]
    Configuration MetaConfig
    {
            Settings
            {
                RefreshFrequencyMins = 30
                RefreshMode = 'PULL'
                ConfigurationMode = 'ApplyAndMonitor'
                AllowModuleOverwrite = $true
                RebootNodeIfNeeded = $true
                ConfigurationModeFrequencyMins = 15
                ActionAfterReboot = 'ContinueConfiguration'
                DebugMode = 'All'
```
        }

        ConfigurationRepositoryWeb ConfigurationManager
        {
            ServerURL = 'https://MyPullServer.com/PSDSCPullServer.svc/'
            RegistrationKey = 'MRegKey'
            CertificateID = 'MyThumbPrint'
            ConfigurationNames = 'Vagrant_US'
            AllowUnsecureConnection = $false     
        }       
}

```
`

I get the following error on the target machine.

The Local Configuration Manager is not configured with a certificate. Resource ‘[cLEAPRegionalSettings]leapRegional’ in configuration ‘MakeTheMof’ cannot be processed.

- CategoryInfo : ObjectNotFound: (root/Microsoft/…gurationManager:String) , CimException
- FullyQualifiedErrorId : MI RESULT 6
- PSComputerName : localhost

Is this an issue with the certificate? Have anyone got this working with a self-signed certificate? Does anyone have any tips to drill down further and get a more useful error message?

This guy seems to be having the same issue:

[https://connect.microsoft.com/PowerShell/Feedback/Details/1399853](https://connect.microsoft.com/PowerShell/Feedback/Details/1399853)

Any help would be much appriciated.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [September 3, 2015, 10:20pm UTC](https://forums.powershell.org/t/encrypting-credentials-production-preview/4821/2 "2015-09-03T22:20:31Z")

</div>

Just for giggles, what happens if you move or copy your CertificateID up under Settings? (If it behaves like previous versions, you’ll get an error about that being unsupported in LCM version 2.0.0, but I just want to make sure something hasn’t changed recently.)

What you’ve done so far looks correct to me, though.

---

<div class="post-metadata">

**Author:** ![paul-kimber](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@paul-kimber](https://forums.powershell.org/u/paul-kimber)\
**Post date:** [September 6, 2015, 9:58am UTC](https://forums.powershell.org/t/encrypting-credentials-production-preview/4821/3 "2015-09-06T09:58:29Z")

</div>

Thanks Dave. It works great if I move the CertificateID to Settings. I had tried this in the April release and it threw the error you mentioned.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 9:17pm UTC](https://forums.powershell.org/t/encrypting-credentials-production-preview/4821/4 "2024-05-16T21:17:14Z")

</div>

Closed on May 16, 2024, 9:17pm UTC


