Open a Folder Using PowerShell

Rohan Timalsina May 13, 2022
  1. Use Invoke-Item Cmdlet to Open a Folder Using PowerShell
  2. Use start to Open a Folder Using PowerShell
  3. Use explorer to Open a Folder Using PowerShell
Open a Folder Using PowerShell

Sometimes when working on PowerShell, you might need to open folders or files, and you exit the PowerShell window to open folders. You can easily navigate different folders and open them without leaving the PowerShell window.

This tutorial will teach you to open a folder or file using PowerShell.

Use Invoke-Item Cmdlet to Open a Folder Using PowerShell

The Invoke-Item command performs the default action on the specified item. For example, it opens an executable file in the application of its file type.

When a folder path is given, it opens that folder in the new File Explorer window.

Invoke-Item C:\New

If you provide . as an argument will open the current working directory in File Explorer.

Invoke-Item .

Similarly, you have to specify a file path to open a file. The following command opens a text.txt file in the C:\New directory.

Invoke-Item C:\New\test.txt

If you find Invoke-Item long, you can also use its alias ii to open folders or files from PowerShell.

ii C:\New

Use start to Open a Folder Using PowerShell

The start is an alias for the Start-Process cmdlet. It starts one or more processes on the local computer.

You have to specify an executable file or a file that a program can open on the computer. The following command opens a C:\Personal Website folder on the computer.

start 'C:\Personal Website'

To open a current working directory, you can use ..

start .

Use explorer to Open a Folder Using PowerShell

Another way to open a folder from PowerShell is using explorer or explorer.exe in the console. It simply opens the specified folder or file in the Windows File Explorer.

explorer C:\pc\computing

You can also use . to open the current folder in the File Explorer.

explorer .

We hope this article helps you understand how to open a folder or file from Windows PowerShell.

Rohan Timalsina avatar Rohan Timalsina avatar

Rohan is a learner, problem solver, and web developer. He loves to write and share his understanding.

LinkedIn Website

Related Article - PowerShell Folder