How can I change the Folder Option "Open File Explorer To" with PowerShell

Viewed 542

I am looking for a way to change this with a PowerShell script:

Folder Options

The default setting is Quick Access and I want This PC. I looked at some posts but nobody wants something like this.

How can I use PowerShell to change the Folder Options settings?

1 Answers

You need to set the LaunchTo property under the registry key HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced.

To do this, we can use the Set-ItemProperty cmdlet:


# Set up the parameters for Set-ItemProperty
$sipParams = @{
  Path  = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'
  Name  = 'LaunchTo'
  Value = 1 # Set the LaunchTo value for "This PC"
}

# Run Set-ItemProperty with the parameters we set above
Set-ItemProperty @sipParams

There are three possible values this will take, so if you want to open Quick Access or Downloads, set the value to either of those numbers instead:

  1. This PC
  2. Quick Access
  3. Downloads

The value for Downloads seems to be undocumented, but it does work. Any other values will result in an error when opening File Explorer about file associations.

Related