ConvertTo-PowerShell: PowerShell versus “other” scripting examples – Part 5: List 20 largest files

April 28, 2010
Thumbnail image for ConvertTo-PowerShell: PowerShell versus “other” scripting examples – Part 5: List 20 largest files

In today’s post, I will show an example script to retrieve a 20 largest files on C: drive. As usual, we will first look at the VbScript example and then see a PowerShell “one-liner”.

Continue Reading →

ConvertTo-PowerShell: PowerShell versus “other” scripting examples – Part 4: Renaming files

April 26, 2010
Thumbnail image for ConvertTo-PowerShell: PowerShell versus “other” scripting examples – Part 4: Renaming files

Continuing this series of posts on PowerShell-ism, today, I will show a VBScript example and then convert it to a PowerShell one-liner. So, this script was my response to a question on the scripting guys forum. This script reads a text file containing tab delimited information and then uses the lines in the text file [...]

Continue Reading →

ConvertTo-PowerShell: PowerShell versus “other” scripting examples – Part 3

April 23, 2010
Thumbnail image for ConvertTo-PowerShell: PowerShell versus “other” scripting examples – Part 3

Yesterday, I mentioned that PowerShell can take care of many important aspects like formatting output, etc and let you focus on the core aspects of what you want to achieve using a PowerShell script. In today’s post I will show an example to demonstrate this.  

Continue Reading →

ConvertTo-PowerShell: PowerShell versus “other” scripting examples – Part 2

April 22, 2010

Please take a look at part 1 to understand why I started this series of articles.  In this post, I will show another example from the scripting guys forum. Again, this is a PowerShell one-liner to do the job of 30 lines of VBScript. What this script does is real simple. It just creates a folder [...]

Continue Reading →

ConvertTo-PowerShell: PowerShell versus “other” scripting examples – Part 1

April 21, 2010
Thumbnail image for ConvertTo-PowerShell: PowerShell versus “other” scripting examples – Part 1

On the scripting guys forum and various other places, I still see various people asking for VBScript examples or DOS batch file examples for achieving various things on Windows OS. I — almost every time (unintentionally) – provided a PowerShell example even when the person’s preference was VBScript or DOS batch. I see many people shying away [...]

Continue Reading →