I have got my DSC Configuration to run and create a MOF file.
When I run the command "Start-DscConfiguration -ComputerName $systemID -Path .\Iweb -Wait -Verbose"
It tells me a reboot is required in order to finish the configuration. I notice that a Task has been created in the TaskSchedular that runs at start up.
I waited for about 15 minutes after the reboot to see if anything happend. Nothing did, so I tried to rerun the the script to see if I could kick start the process.
I get this message:
An old configuration is still pending. Please wait for the pending configuration to finish.
So the question is, How long do I wait? How can I tell if anything is happening at all?
Reboot won't happen automatically if the LCM isn't configured to do, which it isn't by default. It's waiting on YOU to reboot it. So, you may have done that (not sure, based on your message).
After that, the LCM will re-run about every 30min by default.
If it doesn't seem to be working, the correct procedure is not to kick it in the pants :). "The DSC Book" as a WMI call you can make to try and jump-start it. However, when troubleshooting or testing, the right procedure is to first get the xDSCDiagnostics module on the target computer, start a trace, and then run your shenanigans. That way, you can get some log info as to what's happening. You can check the log now, but it's not as detailed without the tracing enabled first.
Oh, I did reboot it. I checked the scduled tasks and saw that the DSC task ran at start up with no errors.
OK, I found an error in my script and corrected it. I reverted my test VM to it's original snapshot and ran my script.
I ran Get-WinEvent –LogName "Microsoft-Windows-Dsc/Operational"
TimeCreated Id LevelDisplayName Message
I also ran Get-xDscOperation and Trace-xDscOperation
ComputerName SequenceId TimeCreated Result JobID AllEvents
PS C:\Windows\system32> Trace-xDscOperation
ComputerName EventType TimeCreated Message
So it loks like everything is fine.
So, how long do I wait untill the process complets?? How can I tell what is happening, if anything.
You can't, really. Keep in mind that this is something you're meant to set and forget... on tens of thousands of servers. Not something you stare at :). Granted, when you're testing, that kind of feedback is nice, but it isn't what the technology is meant to do. If the consistency engine ran successfully, then it should be fine.
If you're wanting to verify that some kind of change was made, you'd do so manually by checking whatever it is.
You must be logged in to reply to this topic.