So I have a working Windows.Forms.FolderBrowserDialog function for Folder selection in my Script.
I noticed Today that I can't any external Shares or even see them with it.
Is there another function for that or is there some special attribute I have to set to see external Shares?
How do you mean "external"? It will see mapped drives and anything in the "Network" folder, though bear in mind that local network discovery could be disabled in the OS and you'd have to enable this in Windows
If you run this with a UNC folder path it should open the browser in that folder:
$RootFolder = '\\myserver\myfoldername'
$FolderBrowser = New-Object System.Windows.Forms.FolderBrowserDialog
$FolderBrowser.Description = 'Select a folder'
$FolderBrowser.ShowNewFolderButton = $false
$FolderBrowser.SelectedPath = $RootFolder
$result = $FolderBrowser.ShowDialog((New-Object System.Windows.Forms.Form -Property @{TopMost = $true }))
Thats my Problem, but I don'r know what $RootFolder is, and the Share isn't visible in Network even after I mapped it.
A mapped share is under "This PC", not under "Network"
See above image - non-mapped shares would be under Network, mapped drives under My PC. If you can't see anything in "network" then look to your operating system settings for network discovery.
Thanks that fixed it. I activated Network discovery and ahd to restart the CLient but after that it worked.