Adding Help to PowerShell Scripts

Recently I have started adding help to all of my PowerShell scripts, I do this for a few reasons. I hope (once I get better at scripting) that other people will use them and in order for others to understand what is going on in the script there needs to be help. It is best practice and makes the overall look and feel of the script much more professional and it comes in handy when I can’t quite remember what I did in a script when I was writing it, sure I could go through and work it out but the help feature makes it so much quicker.

I don’t put in incredibly detailed help information (I should and will eventually) and it is always evolving but at the moment I start off all scripts like this:

Continue reading

Examples why every Windows admin should learn PowerShell

Howdy guys,

I have recently become a firm believer that every Windows administrator should learn and use PowerShell, I know many people have known this for years but at least the penny finally dropped for me.

Using PowerShell, either for day to day administration or to automate regular tasks will make things so much faster and easier and give you more time to research/study/work on stuff you actually enjoy. Firstly I want to show you three quick commands that can make working on your local workstation/server faster. These three are very easy and only scratching the surface of what can be done.

Continue reading

Backup all DHCP servers in Active Directory with PowerShell

Howdy guys,

Today I wanted to go through the PowerShell script I use to backup all the DHCP servers in our Windows domain. The script is a few years old now and I have a feeling there is probably a better way to do it, so look out for an updated script in the future over on my GitHub page. For the moment however this is the one I use.

Continue reading

List and install Microsoft Updates with PowerShell

It has become my goal to do as much server administration as I can via PowerShell. I want to do this mainly to force myself out of my comfort zone (the GUI) and increase my PowerShell knowledge. I recently installed a Windows Server 2016 server that by default comes without a GUI. One of the first things I needed to do was install updates to it. Of course I didn’t know how but I knew there was a module out there for it. Here is my process of how I worked out what to do and how you install Microsoft updates via PowerShell.

Continue reading

Windows domain server disk space audit script

One of the daily checks I perform on our Windows Servers is to ensure they aren’t running low on disk space. There are a few ways this could be done, I could log on to each server individually …. but that would take longer than a full work day to complete. I could use SCOM or a 3rd party monitoring solution but that would cost money and I much prefer to not spend money.

The answer then?

Continue reading