Building and rebuilding labs is something I do frequently. Active Directory is one the biggest requirements for a Windows lab. This means constantly installing AD Forests with the same configurations. Automating this with PowerShell is pretty straightforward, but Dsc can make it even more so.
Using credentials in a DSC configuration is almost unavoidable. Storing your credentials in plain text is absolutely avoidable, and should be a requirement for you; even a lab environment.
After creating 5 posts about automating Sccm primary site installs, I think an example bringing everything together is useful.
The last step in the journey to automating a Sccm Primary Site server install.
This post will be about setting up the Active Directory prerequisites. Specifically creating the System Management container and adding the relevant permissions to that container. I will not be tackling the AD Schema extension. The executable in the Sccm installation media (ExtADSch.exe) does the job perfectly and quickly.
This is a part 2 to my original post about setting up SCCM on a server disconnected from the internet.
I have recently started working with SCCM, which means building (and rebuilding) lab environments for it. I have found that just getting all the prerequisites installed can be tedious and time consuming. Even more so when your SCCM server is not connected to the internet.
ActiveDirectory is of course a huge component in a Microsoft based environment. One of my favorite things to do is explore how other Microsoft products, integrate and leverage Active Directory.
If you look for or have used PowerShell scripts from the internet, you have likely encountered functions with the Begin, Process, and End blocks.
Getting a list of installed applications seems like something
a lot of Windows admins would like to do.
Unfortunately, there isn't an Out-of-the-Box way to do this with PowerShell.
I have worked with Exchange quite a bit, and I wanted to take a look at the newest version on the newest Server OS. Instead of figuring it out everytime I need to build an Exchange lab, I figured it would be a good idea to automate it as much as possible, and document with code.
There are many examples on the internet that show how to remotely connect to Exchange Online PowerShell. Hopefully this post will provide better code, and better insight into the process.
If you are familiar with Linux or come from a Unix background, you probably know about Vim. For those of us that started and stay mostly in the realm of Windows however; Vim may be a foreign thing. I was fortunte enough to be exposed to vim, and see what it can do; now there's no turning back.
If you run a lot of code in any environment, or have multiple environments that you manage, configuration files are incredibly useful. If you do not already use them, you should seriously consider it. JSON is my preferred format this task, and here is how I use it in PowerShell.
In the Windows world, it seems that these files are typically created in eXtensible Markup Language (XML). Xml will work, and if you are stuck with PowerShell version 2.0 or earlier, you may have to stick with that.
I have found that working with passwords and credentials can be intimidating.
I wasn’t intending on making this a 2 part post (Part 1), but I couldn’t leave the code alone. I mentioned in part 1 that additional encoding options could be added, and that’s exactly what I have done here.
Here’s a quick one. In this post we’ll create 2 basic functions for encoding and decoding strings.
Creating VMs from a base image can make your life a lot easier. Not having to sit through and select the same options during an OS install is a big time save.
A lot of work can go into creating a base image, but it doesn’t have to. I will briefly touch on how to create a base Windows image and then get into the automation of creating a Hyper-V VM from that template.
In this post I will be building a Hyper-V Virtual Machine from scratch, using only PowerShell
I don’t know about you, but sometimes I try to run commands that need administrative rights without checking if I have those permissions in my current session. There have even been cases where I have built a function or script that needed a single command to run as an Administrator somewhere near the end, only to have the function get half way before saying ‘Access denied’.
I recently found myself having to do some testing on a few Windows Server 2008r2 machines.
Power the shell!