Jan 302013
 

If you’re like me, sometimes you just feel like counting. Well, in PowerShell you can count easier than ever before! PowerShell gives you ability to not only easily increment, but also run code for each increment because you can pipe! First, let’s take a look at the basic code:

And why limit yourself to counting up?! You can even decrement those numbers:

So, how can you use this? Well, remember the wonderful thing called a pipeline. You can potentially ping an entire subnet with the following command:

Remember, if that command takes too long, you could consider multithreading it with one of the scripts on this site!