I’ve been using VBScript for a very long time. One drawback it has always had as a scripting language is an INCLUDE statement. In other languages you can use something like INCLUDE scriptfile at the beginning of the script. This…
Read More
I’m very happy to see more and more people getting their hands dirty with Windows PowerShell. A common challenge I see across different support forums is getting information from one part of a script to another. Very often the user…
Read More
One of my favorite features in PowerShell v2.0 is the ability to add help scripts and functions. The help system with cmdlets is terrific. Type help and the name of a cmdlet and you get syntax, parameters, a description and…
Read More
A few days ago I went over the PowerShell oneliner from SAPIEN’s March ’09 newsletter. I suggested using it in a scriptblock to save typing. Another possibility is to turn it into a function. Even better would be a function…
Read More
PowerShell’s [DATETIME] object has some handy methods for calculating a date such as AddDays().
PS C:\> get-date
Wednesday, September 03, 2008 4:11:18 PM
PS C:\> (get-date).AddDays(23)
Friday, September 26, 2008 4:11:34 PM
PS C:\>
You can even subtract by adding…
Read More