If you don’t know what I am talking about it’s here: https://github.com/PowerShellOrg/ebooks/tree/master/DSC
My background: I have been using PowerShell for about 3 years, with only the last year getting seriously into it, where I am writing my own scripts and using a lot of its core functionality to accomplish a lot more complicated tasks than Get-Service | Where-Object Name -Like “Microsoft” . I have been reading heavily and watching videos on DSC for about a month. Yesterday I decided to start learning DSC (and it was pure coincidence this book got put up on the same day). Don wanted some feedback, so here goes. I only included feedback for the part up until the Pull Servers as that is all I have experience with. When I go to build my own Pull Server I will use the DSC Book to help me and probably have more feedback on that and later sections then.
Stream of Consciousness Thoughts:
I liked the comparison to GPO’s. I wouldn’t have made that connection myself but it’s a good comparison to a technology everyone should be able to understand.
In the section where you compare GPO’s to DSC I don’t like the part that says “Configuration script (which produces a MOF file)”. As a DSC newbie my immediate thought was “what is an .MOF file???”
Under Extend the Things that can be configured, re-word “simply write new DSC resources in PowerShell” to “Write your own DSC Resources”
Under Number of Configurations “One MOF per computer”. Same criticism as above. What is a MOF and how do I make only one per computer? Just say “One configuration per computer” or something.
“That is, it doesn’t install stuff, configure stuff, or anything else” - Say, The configuration script doesn’t install roles, make changes to the registry, copy files or anything else.
Possibly something to cover is why is it called a Node instead of a Computer (or something similar since the most common parameter in PowerShell is ComputerName)? My hunch is that in the future DSC will be able to be targeted to more than computer objects.
After the comparison table between GPO’s and DSC I feel like you need a sub-heading or something titled “Creating & Deploying a DSC Configuration”
xADComain - Guessing this should say xADDomain
If you are going to put a brief description for the resources, you should do it for all of them, like you did with xComputer (renaming and domain join). I know that that shouldn’t be necessary because people should look them up on their own, but if you are just getting started it’s a lot to process so having a brief description of each is a good thing I think. Either include short descriptions for all of them or none of them.
This section was very good to know. “You do need to be careful with it: when you run a configuration, it’s going to need to create a folder and one or more MOF files. It’ll need to do that in whatever folder the ISE is currently pointed at”. I would have assumed it created the folder in the \Program Files\WindowsPowerShell\Modules directory.
Using parameters in your Configuration Script. Very nice to know, answered a lot of questions I had (the Technet Resource pages don’t use parameters in their examples) and you used a good basic example.
“In this case, we’re asking DSC to ensure that a specific file is present on the target node. If it isn’t, we’ve told DSC where to find it, so that it can copy it over.” The line in the Configuration Script is SourcePath = “\dc01\Software\Monitoring”. Is that really copying a file or is it copying the entire directory? If it’s not copying a file, can you specify a specific file such as \dc01\Software\Monitoring\Watch-Notepad.ps1 and have it copy only that?
Important to point out that you can literally name the Configuration and Nodes anything you want.
Excellent example of how to create a MOF for multiple computers.
The section on discovering resources is amazing. Especially this part “So part of your “finding what resources I have” process is going to necessarily involve browsing the file system a bit to see what’s installed”
In the sequencing configuration items section, I would remove the ProductID part from the example simply because it was never mentioned previously and now it shows up in a example. I immediately started asking myself things like “ProductID of what?” “What format does it have to be in?” “Is that mandatory?” which distracted me away from what I was reading.
Section on the Push Server was short and to the point. The part about the limitation of Resources when using the Pull method was nice to know.
(This is where I stopped) Telling A Computer to Pull The Configuration - How would I have ever known to use LocalConfigurationManager if you hadn’t told me to? Where can I find out more information about this? Are there any more resources like this? Running Get-DSCResource doesn’t show this resource.