We are deploying number of windows VMs from Vmware template and later doin post deployment activites such as firewall enabling, installing sccm client, windows activation using KMS, patching the VM, adding a security group to servers' administrator group, provision the added disk such as D or E drives.
Has anyone ever worked on such type of script? I have been trying to make one but since I'm very new to powershell and automation facing many issues.
#Need help with post deployment script
12 messages · Page 1 of 1 (latest)
powershell is built for these kind of "last-mile" , "glue" scripts. I'd recommend breaking it down into small tasks and making a new post for each one or researching them invidually. If you are looking for a fully fleshed out solution, I'd try ChatGPT or searching github.com .
Otherwise, you'd have to post code snippets and their corresponding errors. Each of those items in your list are projects and scripts on their own and whole software platforms are built around solving these problems.
I do something similar to DSC for mine because I hold strong opinions on how this kind of thing is best done.
However, nothing stops you starting with a script and slowly ticking off your to-do list up at the top.
Do you like DSC in general? Is that how you would maintain win server config?
I like the pattern, I dislike (and don't use) the implementation
but the pattern is a good one imo.
It encourages breaking down things into very small problems. It allows you to moderately abstractly describe the state of a thing.
From the list above, I would expect the first item to be easy to deal with.
Installing SCCM might need a bit more effort, but it's not new ground.
I'd have thought activation would be automatic, but it's also just a single command so not a big deal.
Patching bumps back up to the more complicated. For patching you have to handle reboots depending on OS age. Not new ground, just a point of possible complexity.
Security groups to administrators, we're back to trivial again.
Do you have a preferred tool? It seems like such a *nix world with general devops and sysops tooling.
wrote one
a DSL type deal?