I’ve made a configuration to install IIS on a server. It generated a localhost.mof. I renamed it to IIS.mof. Now I want a lcmconfig that I can push to any node.
When running Set-DscLocalConfigurationManager you want to point to the directory where the .meta.mof is located at. When executing the cmdlet it will locate a matching .mof file to the specified computer name.
Example:
## Incorrect ##
Set-DscLocalConfigurationManager -ComputerName TestMachine -Path "C:\Temp\DscConfigurations\TestMachine.meta.mof"
## Correct ## Point to the directory where the .meta.mof exists.
Set-DscLocalConfigurationManager -ComputerName TestMachine -Path "C:\Temp\DscConfigurations"
Also when creating the .meta.mof file as localhost and then updating the file name to IIS will do you no good. That must be the name of the host you are updating or (I think) the assigned Configuration ID (If you are using Configuration IDs). When a meta.mof file gets created it contains meta data which includes “@TargetNode=‘’”.
A localhost.meta.mof cannot be deployed to a remote computer. I need one for each machine as I’m deploying from the pull server itself. Alternatively, I can run the lcmconfiguration as localhost on the destination machine.