Tag Archives: beginner series


Add A Column To A CSV Using PowerShell

Say you have a CSV file full of awesome, super great, amazing information. It’s perfect, except it’s missing a column. Luckily, you can use Select-Object along with the other CSV cmdlets to add a column.

In our example, let’s say that you have a CSV with two columns “ComputerName” and “IPAddress” and you want to add a column for “Port3389Open” to see if the port for RDP is open or not. It’s only a few lines of code from being done.

Continue reading


Use Test-NetConnection in PowerShell to See If A Port Is Open

The days of using ping.exe to see if a host is up or down are over. Your network probably shouldn’t allow ICMP to just fly around unaddressed, and your hosts probably shouldn’t return ICMP echo request (ping) messages either. So how do I know if a host is up or not?

Well, it involves knowing about what your host actually does. What ports are supposed to be open? Once you know that, you can use Test-NetConnection in PowerShell to check if the port is open and responding on the host you’re interested in.

Continue reading


Calculated Properties in PowerShell

Most of the time, a PowerShell cmdlet will return all the information you need to work with it later in the pipeline. Sometimes, though, there’s some assembly required. What I mean, is maybe the cmdlet returned the information you need, but not in the format you want, or you wish you had some property multiplied by some other property. Let’s explore.

Continue reading