Windows Sandbox Explorer: a quick PowerShell way to modify the default Windows Sandbox

In this post I will show you a quick tool I created allowing you to modify the default Windows Sandbox to add your own content (folders, files, regustry).


- You want to use Windows Sandbox

- You want to add by default folders or files in Sandbox

- You want to set the default

- You want to set some registry keys

Get the script ?

Click on the below GitHub picture to get the script:

How does it work ?

Add folders or files

1. Create a folder like C:\MySandbox

2. Create the folder structure like in the Sandbox

3. For instance, I want to add module AzureAD

4. Create structure: C:\mysandbox\Program Files\WindowsPowerShell\Modules

5. Copy modules AzureAD there

6. Now I want to add a folder new folder on user desktop

7. Create: C:\mysandbox\Users\WDAGUtilityAccount\Desktop

8. Then add folder there

Add registry keys

1. Copy file Sandbox_registry_content.xml in C:\mysandbox

2. Create a new node for a new registry keys

3. See below how is composed a node:

- Reg_Path: registry path of the key

- Reg_PropertyType: kinf of the registry key (string, word...)

- Reg_Property: name of the property

- Reg_Value: value of the property

4. In the below example I will set the wallpaper with an existing one:

5. We will now add a new wallpaper. 

6. Create the following folder structure: C:\MySandbox\Windows\Web\Wallpaper

7. Add your wallpaper there:

8. Add a new node in the XML, as below:

5. In the below example I will set the New and Interest part

How to use it ?

1. Run the file .\WindowsSandbox_Explorer.ps1

2. Use parameter Content_to_add

3. Add the path your Sandbox structure, there C:\MySandbox

4. See below the command:

5. Run the Sandbox

6. See below an overview of the script execution and Sandbox opening:

7. See below result after adding our own wallpaper:

Note: You may have to repeat the process after some Windows Updates.

What's next ?

I will add some other features to add

Windows_Sandbox 4793707781250907528

Enregistrer un commentaire

Accueil item


Yo want to support me ?

Mes articles en français

Endpoint Manager award

Author of Books

PowerShell GUI & WPF Group

PowerShell GUI & WPF Group