In this post I will explain using and managing Powershell modules. A Powershell module is simply a piece of code which adds more commands to the Powershell compiler to expand its cross platform functionality. For example: Need to get info out of VMWare? No problem, there are several modules for that. Need to get SNMP…
Category: Tutorial
PowerShell Tutorial, what version am I running?
Knowing the version of Powershell you are running is very important as some commands/syntax will only work on new versions and vice-versa. To display the Powershell version, issue one of the following commands: Get-Host | Select Version $PSVersionTable Versions of Powershell are as follows. V1 and V2 were released in 2006 for XP SP2, Vista…
Powershell Tutorial Dealing with Snapshots
Snapshots, if left undetected will grow and consume space as well as slow your VMs down if you have enough of them. This is an endless battle for the system administrator as (in my experience) developers will want to keep snapshots forever. This often leads to the same “snapshots are not backups” conversation. In this…
Powershell tutorial, Jobs part 1
Powershell code runs synchronously. This means that one line is processed at a time until the end of the script is reached. This is fine for most scripts but there will be situations where this type of execution is not ideal. A port scanner for example would take forever if it ran synchronously. When creating…
Powershell tutorial, Jobs part 2
Here is a Ping sweeper script using Powershell jobs to speed things up. The script works (at a high level) like this: I create an array of IP addresses to scan. I loop through each IP If I am running the max number of concurrent jobs, wait for some jobs to finish, add the results…