Skip to main content

Powershell – The DSC book

Don Jones (@concentrateddon) is writing this awesome book about DSC. Please help him review the contents and make suggestions. You may leave feedback on the Powershell.org/FAQ web page (just create a new post there).


I have been working as an consultant in IT since 1999, I have done a lot of strange “things” (work related that is). I have done my fair share of vb-scripting and small GUIs or console application development using vb.net etc. I have even created an automation solution/"framework" with powershell and .net (.net Forms). I have been using powershell since exchange 2007, however the last 2 years I have been a “heavy” user writing advanced scripts/functions, dot-sourcing, creating small modules etc. Full disclosure; I am not exaggerating when I say I am super excited about DSC.

My comments (in random order, when I say you/your I target Mr Jones, I think :-))
  • DSC resources – As you mention Microsoft has released 2 waves of additional resources for DSC. What are your thoughts about using these resources in production compared to creating your own custom DSC resources. They are marked x for experimental according to Microsoft…
  • Overall strategy/design of a DSC "solution" – I must admit I struggled with how you should create the configuration when you are limited to a single MOF-file. That is until I read a post about Composite resources in January I think. It is super important that people understand how they go about creating their DSC structure. Maybe you could include some general key "design-rules" for the DSC solution.
  • Credentials and security – Take the package resource (built-in). It is not perfectly clear that the credentials you supply is used for accessing the network location you have specified for the SourceFiles and not for the "installation" of the package (since you brought up the productID challenge).
  • Complicated application packages – How or can do you install those with DSC. Say you have an installer that is capable of setting up an application in an scaleout manner, that is you install the application and the database is hosted on another computer and the setup/installer does the initial configuration for the database. Could you use DSC for that? If so an example would be very cool and most helpful.
  • Show how to use multiple dependencies for DependsOn - DependsOn = @("[WindowsFeature]HyperV", "[File]VHDFolder")
  • Why DSC – The argument for DSC – More information and marketing (like this book) is needed to promote the new way of configuring your datacenter and infrastructure. Even with your rants – i like those by the way – there is still people that do not get the full picture of what is slowly happening. Automation is the future, however if you are scoping your book to a wide audience, perhaps you could include an executive summary for the none-technical readers that are wondering what the DSC-fuzz is all about.
  • Monitoring of DSC – Being a System Center guy with focus on SCOM, I would like to monitor DSC  with an ManagementPack (monitor both the PUSH/PULL infrastructure and the individual DSC target nodes testing for configuration drift). It maybe of topic for your book, however this may be where compliance comes into play somehow?
  • Azure/Windows Azure Pack – Wouldn’t it be a wonderful to have DSC resource for it?
  • ConfigMgr Desired State vs Powershell DSC – Why use Powershell DSC instead. I do not know if the desired state in ConfMgr is used by organizations,maybe they rely on GPO?
  • Group Policy vs Powershell DSC – Must also admit that I have a love2hate relationship with GPO. Why should enterprises start to replace GPO with DSC? What can you write to convince them that DSC is the bucket of gold they shall find at the end of the rainbow?
  • How to prevent overwriting of the current configuration for a node by accident or pure evil intent. Compliance I guess?
Please feel free to ignore the comments that does not suit your thoughts or the scope of your book. Keep up the good work, we are hungry for more.

Cheers

Comments

Popular posts from this blog

Monitoring Orchestrator runbook events from Operations Manager

Today I will follow up on my colleague’s post Mr ITblog (Knut Huglen) about monitoring Orchestrator Runbook events.  He has build a nice double up SNMP loopback feature that does self monitoring in Orchestrator resulting in entries written to a special Windows Eventlog. Now we need to raise alerts in SCOM when one of his runbooks fails or sends a platform event, who knows there could be trouble lurking in his paradise.

We are not going to do anything fancy, however these are the steps we will be focusing on today:
Create a Management Pack for our customizations Create rules that collects the events from the orchestrator serverOff we go then and fire up the SCOM console and a powershell window. First we create a MP, I am going to use powershell to do this, however you may use the SCOM console as well (Administration – ManagementPacks – Action: Create Management Pack):



Import the Management Pack into SCOM and move on to the Authoring section in the SCOM console. Create a new rule:



Give the…

Build your local powershell module repository - ProGet

So Windows Powershell Blog released a blog a couple of days ago (link). Not too long after, a discussion emerged about it being to complicated to setup. Even though the required software is open source (nugetgalleryserver), it looks like you need to have Visual Studio Installed to compile it. I looked into doing it without visual stuidio, however I have been unable to come up with a solution. I even tweeted about it since I am not an developer. Maybe someone how is familiar with “msbuild” could do a post on how to do it without VS.

Anyhow one of my twitter-friends (@sstranger) came to the rescue and pointed me in the direction of ProGet, hence the title of this post. ProGet comes in 2 different licensing modes
Free (reduced functionality)Enterprise (paid version with extra features)The good news is that the free version supports hosting a local PowershellGet repository which was my intention anyway. So off we go and create a Configration that can install ProGet for us. This is the conf…

Powershell – Log like you mean it

How do you do logging in powershell? Why should you do logging? What should you log? Where do you put your log? How do you remove your log? How do you search your log? All important questions and how you answer then depends upon what your background is like and the preferences you have. This will be a 2 part blog post and this is part 1.


Why should you log?

Well it is not mandatory, however I have 2 reasons:
Help with debugging a script/module/functionSelf documenting script/module/function
Firstly; Do you know any program that does not contain any bugs? Working with IT for the last 2 decades, I cannot name one. When you create scripts/modules/functions, you will create bugs, that is where they live and try to make your life a living mess.

Secondly: Adding a little extra information to your logging will make them self documenting. Do you like writing documentation? Well I normally am not fond of it and use logging while debugging to get two birds with one stone.


What should you log?

Anyt…