My Profile Photo

${Graham Beer} = blog


System Engineer, PowerShell Developer, WinOps and a huge automation fan!


  1. What's my Alias? Write less for the same results

    PowerShell Cmdlets are by nature verbose. When you write a script those helpful cmdlets make a script easier to understand. But when working with the shell interactively, its useful and quicker to adopt less is more approach. Well, if you are like me and want to type less ! Take a simple example: 1get-content 'D:\temp\machinelist.csv' | select-string -SimpleMatch "Server" The commandline above gets the content of a csv file with a list of machines, pipes...…


  2. A date with PowerShell

    Also seen on PowerShell.org ! At the beginning of July, we welcomed our 3rd son into the world. As days past my wife and I would say, “wow, he’s 11 days old. Can you believe it?!”. I’m sure parents out there are relating to this! This gave me an idea for a fun script that would get your age in years, months and days, tell you how many days until your birthday and your star...…


  3. To ping or not to ping..The PowerShell way

    As Seen on PowerShell.org !!! The inspiration for this blog came from a forum post on Powershell.org that I helped contributed on. The question asked was, how to display the name of failed ping, i.e. $computer is offline. There were some great responses, the one I most liked which I slightly amended into a function was: function test-ping { $args | % {[pscustomobject]@{online = test-connection $_ -Count 1 -quiet;computername = $_}} } The simplicity and...…


  4. ConfigMgr overview: quick view of servers and roles

    If you have a reasonable sized Configuration Manager environment, then quickly displaying servers, with a list of roles installed and the number roles for each site is not easy. This sort of information can be useful to your manager, a 3rd party coming in to do a review or walking into a new job. This script I created will display this information for you and quickly. Running the script has two options: 1. Get-CMSiteOverview : This will display all the...…


  5. PS Function : IP to Hostname / Hostname to IP

    Here is a short reusable function that came about when I recently had an error popup with just an IP address. Turned out it was error many users were getting that caused a problem in the company. From the IP address I wanted to get the Hostname to ask the Wintel department if they knew of this Server.  I could have simply used the “Ping” command with a ‘-a’ option, but I wanted to find...…