Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Prompt for folder selection with a dialog.
$path = [System.IO.Path]::GetDirectoryName($MyInvocation.MyCommand.Path)
$objShell = new-object -com shell.application
$objFolder = $objShell.NameSpace($path)
$namedfolder = $objShell.BrowseForFolder(0,"Select the root of the driver.",0,$path)
$namedfolder.self.path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment