I'm sure this must be possible, but I can't find out how to do it.
Any clues?
I'm sure this must be possible, but I can't find out how to do it.
Any clues?
$startinfo = new-object System.Diagnostics.ProcessStartInfo
$startinfo.FileName = "explorer.exe"
$startinfo.WorkingDirectory = 'D:\foldername'
[System.Diagnostics.Process]::Start($startinfo)
Hope this helps
Just use the invoke-item cmdlet. For example, if you want to open a explorer window on the current directory you can do:
invoke-item .
You have a few options:
Examples:
PS C:\> explorer PS C:\> explorer . PS C:\> explorer /n PS C:\> Invoke-Item c:\windows\explorer.exe PS C:\> ii c:\windows\explorer.exe PS C:\> [diagnostics.process]::start("explorer.exe")
ii .
Is one of the most common things I type at the PS command line.