Create a folder hierarchy in an Outlook PST file

Lately I have been busy creating archive mailboxes and importing PST data to the archive mailboxes (which will be the subject of a future post). As part of that project we found a subset of people whose idea of “personal folders” was to drag all of their mail to a folder on a network share […]

Leave a comment

Modify PowerGUI snippets to function in the PowerShell ISE

Recently I discovered Glen Scales post “EWS Snippets for PowerGui” Although PowerGUI now works with version 3 of PowerShell, I am still using the PowerShell ISE for script development. So, I wrote a script to convert PowerGUI snippets to PowerShell ISE snippets. Both PowerGUI and PowerShell ISE snippets are written in XML. Sadly, I am […]

Leave a comment

PowerShell Version 3 if..else bug

Consider the following from PowerShell’s excellent help: Get-Help about_If 001002003004005006007008 if ($a -gt 2) {    Write-Host “The value $a is greater than 2.”}else{    Write-Host “The value $a is less than or equal to 2, is not created or is not initialized.” } If you modify that example to tighten it up a bit, and make it look better you can cause the […]


Quick modification of the Compare-Command.ps1 script

I found a few issues with my Compare-Command script, and have resolved them. If you have already downloaded it from TechNet, thanks, and you can just modify the following two lines: Line 72 becomes:$V3Detailed |select -ExpandProperty Parameters |ForEach-Object -Process {$V3Paramaters += (“$($_.Name)=$($$($V3ModuleName[0])“)} Line 82, likewise, becomes:$V2Detailed |select -ExpandProperty Parameters |ForEach-Object -Process {$V2Paramaters += (“$($_.Name)=$($_.ParameterType.Split(“.”)[-1])=$($V2ModuleName[0]))”)} While […]

Leave a comment

Quickly compare PowerShell V2 and V3 cmdlets

Recently, I was looking for the difference between the Get-ChildItem cmdlet in Version 2 and Version 3 of Windows PowerShell. Although you can Bing “PowerShell Get-ChildItem v3” and get an accurate listing of the new parameters from TechNet, that’s not true for all cmdlets, so I wrote a quick little script to find the information. […]

Leave a comment

Got-Bug? Connect it!

I have been running the various versions of PowerShell 3 since the first Windows 8 developer preview was released, and started using the PowerShell ISE at the same time, as PowerGUI was not compatible with the required .Net 4.0 bits. (That’s since been fixed, and yet I remain with PowerShell ISE). Anyhow, I noticed a […]

Leave a comment

PowerShell V3 Console improvement

This may not seem earth shattering, but it’s major news in my world (I’m a 1 finger typist) In the V3 CTP, you now have the ability to use autocomplete in the console, in the middle of a line without losing the rest of the line. This allows you to do this: Get-Mailbox |Select-Object Name, […]


Print from PowerShell’s Integrated Scripting Environment

Since I started working with the PowerShell V# CTP, I have been using the ISE instead of PowerGUI’s script editor, as PowerGUI does not yet support .Net version 4, which is required by PowerShell V3. One feature that is missing in the ISE is the ability to print a script. Jeffry Hicks has a solution […]

Leave a comment

PowerShell WMI Gather DNS settings for all Servers

A question came up on TechNet: “I am new to PowerShell and need a wmi script to query all the servers on my network for there dns settings and dump it out to a text file.  Would someone be able to help me get started?” This was a fairly long script, so I decided to […]


PowerShell V.Next: Simplified Where-Object and ForEach-Object

I was perusing the samples that come with the PowerShell V3  CTP (Samples\WindowsPowerShell) when I noticed a folder called “Simplified Foreach and Where” Lo and behold, you no longer need curly braces “{}” or the $_ to refer to the current object in the ForEach-Object and  Where-Object cmdlets! The sample is incredibly simple, but quickly […]



Get every new post delivered to your Inbox.

Join 74 other followers