Hi,
Trying to use composite DSC ressource and have created the following:
PS C:\Windows\system32> dir 'C:\Program Files\WindowsPowerShell\Modules\CommonConfig\DSCResource\xCommonConfig'
Directory: C:\Program Files\WindowsPowerShell\Modules\CommonConfig\DSCResource\xCommonConfig
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 09-07-2014 13:11 5240 xCommonConfig.psd1
-a--- 09-07-2014 11:26 143 xCommonConfig.schema.psm1
PS C:\Program Files\WindowsPowerShell\Modules\CommonConfig\DSCResource\xCommonConfig> gc .\xCommonConfig.schema.psm1
Configuration CommonConfig {
WindowsFeature TelnetClient {
Ensure = 'Present'
Name = 'Telnet-Client'
}
}
The .psd1 file got created by running this:
New-ModuleManifest –Path "C:\Program Files\WindowsPowerShell\Modules\CommonConfig\DSCResource\xCommonConfig\xCommonConfig.psd1" –RootModule "xCommonConfig.schema.psm1"
However, the module does not show up:
PS C:\> Get-DscResource
ImplementedAs Name Module Properties
------------- ---- ------ ----------
Binary File {DestinationPath, Attributes, Checksum, Con...
PowerShell Archive PSDesiredStateConfiguration {Destination, Path, Checksum, DependsOn...}
PowerShell Environment PSDesiredStateConfiguration {Name, DependsOn, Ensure, Path...}
PowerShell Group PSDesiredStateConfiguration {GroupName, Credential, DependsOn, Descript...
Binary Log PSDesiredStateConfiguration {Message, DependsOn}
PowerShell Package PSDesiredStateConfiguration {Name, Path, ProductId, Arguments...}
PowerShell Registry PSDesiredStateConfiguration {Key, ValueName, DependsOn, Ensure...}
PowerShell Script PSDesiredStateConfiguration {GetScript, SetScript, TestScript, Credenti...
PowerShell Service PSDesiredStateConfiguration {Name, BuiltInAccount, Credential, DependsO...
PowerShell User PSDesiredStateConfiguration {UserName, DependsOn, Description, Disabled...
PowerShell WindowsFeature PSDesiredStateConfiguration {Name, Credential, DependsOn, Ensure...}
PowerShell WindowsProcess PSDesiredStateConfiguration {Arguments, Path, Credential, DependsOn...}
PowerShell xArchive xPSDesiredStateConfiguration {Destination, Path, CompressionLevel, Depen...
PowerShell xDSCWebService xPSDesiredStateConfiguration {CertificateThumbPrint, EndpointName, Confi...
Composite xFileUpload xPSDesiredStateConfiguration {destinationPath, sourcePath, credential, c...
PowerShell xPackage xPSDesiredStateConfiguration {Name, Path, ProductId, Arguments...}
PowerShell xPSEndpoint xPSDesiredStateConfiguration {Name, AccessMode, DependsOn, Ensure...}
PowerShell xRemoteFile xPSDesiredStateConfiguration {DestinationPath, Uri, Credential, DependsO...
PowerShell xService xPSDesiredStateConfiguration {Name, BuiltInAccount, Credential, Dependen...
PowerShell xWindowsProcess xPSDesiredStateConfiguration {Arguments, Path, Credential, DependsOn...}
I have tried numerous time, different folder structure, trying in “C:\Program Files\WindowsPowerShell\DscService\Modules” folder also.
And ofcourse, I also get an error when trying to Import-DSCResource CommonConfig in a .ps1 config file.
Any thoughts?
Best regards
Stig