Skip to content

Instantly share code, notes, and snippets.

@matthewjberger
Created July 22, 2016 15:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save matthewjberger/57fcd8a7d7a7625d62f12ad1352fd1ee to your computer and use it in GitHub Desktop.
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