title: $FolderBrowser.ShowDialog() and automatically select enter
body: <p>I'm trying to create a small automated snippet. The following snippet displays a folder in a shared drive but I need to automatically use the keystroke <kbd>Enter</kbd> to confirm the selected folder.</p>
  
  <pre><code>Add-Type -AssemblyName System.Windows.Forms
  $FolderBrowser = New-Object System.Windows.Forms.FolderBrowserDialog -Property @{
      SelectedPath = 'S:\FOLDERNAME'
  }
  
  $FolderBrowser.ShowDialog()
  $FolderBrowser.SelectedPath
  </code></pre>
  
  <p>Once the folder is selected, how do I automate the <kbd>Enter</kbd> keypress to confirm the path? I am using PowerShell 5.0.</p>