Author Posts

September 13, 2018 at 6:48 am

Hi Guys,
Before I start I would like to point that I am not a beginner in powershell. One of my friends was on Microsoft Techdays and there was people from Microsoft and few MVP's. Interesting thing was that they had a script that install complete environment with domain controllers, memeber servers, rds whatever you name it. I am installing everything through powershell and I know how to use it but I don't want to have many scripts that install peace by peace – one for dc installation, second one for rds etc... I know that there are Lab Builders but if I am not wrong they are used just for labs and not the production. My question is how can I create a script that will install DC, create desired ad groups and OU structure add member servers to domain etc. Is there a way to do it with minimal administrative action or not? Please give me some advice. One more time I know how to use powershell and install all parts manually but not from a single script where we have domain controller reboots, rds environemnt (with collections etc) and things like that. I am not asking that you guys create a script just advice how to start and what I need to think in scenarios like this

September 13, 2018 at 11:41 am

Have you heard about PowerShell DSC ? if not please go through belo docs, its awesome.

September 13, 2018 at 11:56 am

Define environment!

Installing an OS onto a desktop or server? (yea probably DSC is the best bet)

Installing an entire platform as a base for a private cloud?

Yes it is possible and has already been done, but you have to have all the licenses and pieces to really put it into practice.

September 18, 2018 at 2:58 pm

Thank you so much guys. DSC is that what I need. Now when I am reading the documents every person both on mva and on blogs are talking like you can use DSC  to get your demo environment up and running very fast. "DEMO" environment? I don't want to use this only in demo. Is the configuration same for testing and live or there are changes?


Shall I configure LCM to Apply only when configuring DC in production? I need config only once, right?

If I apply config only once does that mean that server will not have connection with the mof anymore.

Do I need to clear dnscache on the machines that will join to domain? Would be good to automate this so that I don't need to clearcache on all member hosts under the process or this will not cause the issue?

What is the real-scenario shall we use pull server or shall we stick to the push method?

I am asking this because I want to use this solution for hosting, I want to create many configs so when we get new client that I have config that will install everything for me.

Thank you in advance everyone for help

September 18, 2018 at 6:52 pm

DSC is a big topic.  There are many ways to do things – basically, you need to define how you want your environment to work first and then pick the DSC settings which will make it work the way you want.

Shall I configure LCM to Apply only when configuring DC in production?
Do you want your server to only take the initial config or do you want it to be able to autocorrect/report on changes which take the server outside of the configuration?

When I've used DSC in the past, I've used a pull server.  It has some drawbacks, as does push, but pull fit for what we were doing (multiple servers, apply/repair not just apply once, configs updated a few times a year) at the time.

It might be a good to get and read the DSC book which may help answer some of your questions more.