Archive for July, 2013

Powershell: OpenFileDialog x64 systems

July 8, 2013 Leave a comment

Recently I had an issue where the Openfiledialog was not working anymore in one of my Powershell scripts. Nothing happened when I executed my script. The strange thing was that the script was working on an 32-bit system and also with PowerGUI on x64 systems.

The solution is to add the ShowHelp parameter of the OpenFileDialog form and configure it as true:

OpenFileDialog.ShowHelp = $true

The ShowHelp parameter is a new feature within Windows 2008 or above which you must define in Powershell if you want to use the Openfiledialog.

Categories: Powershell