Is it possible to open a Windows Explorer window from PowerShell?
Use:
ii .
which is short for
Invoke-Item .
It is one of the most common things I type at the PowerShell command line.
You have a few options:
- Powershell looks for executables in your path, just as cmd.exe does. So you can just type explorer on the powershell prompt. Using this method, you can also pass cmd-line arguments (see http://support.microsoft.com/kb/314853)
- The Invoke-Item cmdlet provides a way to run an executable file or to open a file (or set of files) from within Windows PowerShell. Alias: ii
- use system.diagnostics.process
Examples:
PS C:\> explorer
PS C:\> explorer .
PS C:\> explorer /n
PS C:\> Invoke-Item c:\path\
PS C:\> ii c:\path\
PS C:\> Invoke-Item c:\windows\explorer.exe
PS C:\> ii c:\windows\explorer.exe
PS C:\> [diagnostics.process]::start("explorer.exe")
Use any of these:
start .
explorer .
start explorer .
ii .
invoke-item .
You may apply any of these commands in PowerShell.
Just in case you want to open the explorer from the command prompt, the last two commands don't work, and the first three work fine.