ConfigurationRepositoryShare & ResourceRepositoryShare not working

Whenever I try and use ConfigurationRepositoryShare or ResourceRepositoryWeb
I get an error like the following:

LCM failed to retrieve the property RegistrationKey from the object of class OMI_ConfigurationDownloadManager .
+ CategoryInfo : MetadataError: (root/Microsoft/…gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MI RESULT 12
+ PSComputerName : localhost

Settings {
RebootNodeIfNeeded = $true
ActionAfterReboot = ‘ContinueConfiguration’
ConfigurationMode = ‘ApplyOnly’
RefreshMode = ‘Push’
DebugMode = ‘All’
#Credential = $credential

    ConfigurationRepositoryShare Smb {
        SourcePath = $SmbShare
        #Credential = $credential

Okay I finally figured it out. To get this to work I had to add the ConfigurationID property to the settings section of my configuration. After this it started working. Thanks.