I'm having an issue where the .mof file doesn't get generated when using a composite resource in it.The directory gets created fine and no errors are shown. It might be a simple issue to some fresh eyes, but I'm not seeing it :)
The composite resource gets recognized fine and as I said, no errors are shown. I'd appreciate any help!
Here are my configuration files:
composite resource
Configuration OfficeServer { PARAM ( [string]$IPAddress ) Import-DscResource -Modulename XNetworking, PSDesiredStateConfiguration { xIPAddress IPAddress { IPAddress = $IPAddress InterfaceAlias = "Ethernet" DefaultGateway = "192.168.10.1" SubnetMask = 24 AddressFamily = "IPV4" } xDNSServerAddress DNSServer { Address = "192.168.10.44" InterfaceAlias = "Ethernet" AddressFamily = "IPV4" } } } the configuration to generate the .mof
Configuration test { Import-DscResource -modulename CommonConfig Node localhost { OfficeServer test { IPAddress = "192.168.10.92" } } }
$IPAddressparameter mandatory. I recall an issue I had with a custom resource where I couldn't use it properly without at least one mandatory/key parameter.Configurationdefinition you should then be calling the configuration as a function:test -OutputPath .\put\mof\here