Above did not work for me. Starting Windows 7 with Powershell version 2. I found the following that allowed a popup and selection:
Function Select-FolderDialog { param([string]$Description="Select Folder",[string]$RootFolder="Desktop") [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") Out-Null $objForm = New-Object System.Windows.Forms.FolderBrowserDialog $objForm.Rootfolder = $RootFolder $objForm.Description = $Description $Show = $objForm.ShowDialog() If ($Show -eq "OK") { Return $objForm.SelectedPath } Else { Write-Error "Operation cancelled by user." } }
Just in case, others have the same problems.
source share