How to open 'This PC' using CMD or Powershell?
Just like you can run explorer.exe C:\
to open up the C:
(or any other drive or folder path), you can also use a file:
URI to open paths in Explorer as well. If you just specify the file:
protocol without a directory (or specify file:\\
), it will open This PC
:
explorer file:explorer file:\\
Note that you can also change the default Explorer location from Quick Access
to This PC
as well from Folder Options
:
You can set this in the registry too if you're after automation to configure this. See my answer on how you can use PowerShell to set the default launch folder in the registry.
My experience is that, the following should work:
From cmd:
Start "" "%SystemRoot%\explorer.exe" /Select,"This PC"
From powershell:
Start "$Env:SystemRoot\explorer.exe" "/Select,'This PC'"