{"id":7621,"date":"2020-07-29T15:35:36","date_gmt":"2020-07-29T19:35:36","guid":{"rendered":"https:\/\/jdhitsolutions.com\/blog\/?p=7621"},"modified":"2020-09-30T16:49:57","modified_gmt":"2020-09-30T20:49:57","slug":"doing-more-with-windows-sandbox","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/","title":{"rendered":"Doing More with Windows Sandbox"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"alignleft\"><img loading=\"lazy\" decoding=\"async\" width=\"160\" height=\"106\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/little-boy-playing-in-the-sand-6459.jpg\" alt=\"sandbox\" class=\"wp-image-7622\"\/><\/figure><\/div>\n\n\n\n<p> One of the reasons I was looking forward to updating to Windows 10 2004 was to have access to the Windows Sandbox feature. I think I tinkered with a pre-release version and was intrigued. I normally have a set of Hyper-V virtual machines that I can test with, but I'm always looking for something new to play with. And what is better to play with than a sand box!<\/p>\n\n\n\n<p>You can enable the feature through Add\/Remove Programs. That's what I did. But you should be able to use PowerShell. You might want to first verify you have the right bits.<\/p>\n\n\n\n<pre class=\"wp-block-code lang:ps mark:0 decode:true\"><code lang=\"powershell\" class=\"language-powershell\">Get-WindowsOptionalFeature -online -FeatureName Containers-DisposableClientVM<\/code><\/pre>\n\n\n\n<p>If so, you should be able to enable it.<\/p>\n\n\n\n<pre class=\"wp-block-code lang:ps mark:0 decode:true\"><code lang=\"powershell\" class=\"language-powershell\">Enable-WindowsOptionalFeature -Online -FeatureName Containers-DisposableClientVM<\/code><\/pre>\n\n\n\n<p>Once installed, find the Start Menu shortcut and launch it. It takes but a moment.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1055\" height=\"662\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/wsb-1.png\" alt=\"wsb-1\" class=\"wp-image-7623\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/wsb-1.png 1055w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/wsb-1-300x188.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/wsb-1-1024x643.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/wsb-1-768x482.png 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/wsb-1-850x533.png 850w\" sizes=\"auto, (max-width: 1055px) 100vw, 1055px\" \/><\/figure><\/div>\n\n\n\n<p>The container will have Internet access and is meant to be, as the name implies, disposable. It is also meant to be isolated and protected. However, you can customize the Windows Sandbox to make it better fit your needs. Be aware, that most likely any configurations you impose might reduce security. Or at least the sandbox's original intent. You'll have to balance between security and usability.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Customization Files<\/h2>\n\n\n\n<p>The Windows Sandbox doesn't have much in the way of a management interface. Maybe that will change in future versions.&nbsp; If you want to customize your sandbox experience, you need to create an XML file that uses a .wsb extension.&nbsp; There is documentation at <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/security\/threat-protection\/windows-sandbox\/windows-sandbox-configure-using-wsb-file\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/docs.microsoft.com\/en-us\/windows\/security\/threat-protection\/windows-sandbox\/windows-sandbox-configure-using-wsb-file<\/a> but I'll share with you what I'm doing.<\/p>\n\n\n\n<pre class=\"wp-block-code lang:xml mark:0 decode:true\"><code lang=\"xml\" class=\"language-xml\">&lt;Configuration>\r\n    &lt;MappedFolders>\r\n        &lt;MappedFolder>\r\n        &lt;!-- Create a drive mapping that mirrors my Scripts folder -->\r\n            &lt;HostFolder>C:\\scripts&lt;\/HostFolder>\r\n            &lt;SandboxFolder>C:\\scripts&lt;\/SandboxFolder>\r\n            &lt;ReadOnly>false&lt;\/ReadOnly>\r\n        &lt;\/MappedFolder>\r\n         &lt;MappedFolder>\r\n            &lt;HostFolder>C:\\Pluralsight&lt;\/HostFolder>\r\n            &lt;SandboxFolder>C:\\Pluralsight&lt;\/SandboxFolder>\r\n            &lt;ReadOnly>true&lt;\/ReadOnly>\r\n        &lt;\/MappedFolder>\r\n    &lt;\/MappedFolders>\r\n    &lt;ClipboardRedirection>true&lt;\/ClipboardRedirection>\r\n    &lt;MemoryInMB>8192&lt;\/MemoryInMB>\r\n    &lt;LogonCommand>\r\n     &lt;Command>C:\\scripts\\sandbox-setup.cmd&lt;\/Command>\r\n    &lt;\/LogonCommand>\r\n&lt;\/Configuration><\/code><\/pre>\n\n\n\n<p>For my purposes, I want a relatively clean PowerShell environment for testing code and modules. I also wanted something I might use in a Pluralsight course.<\/p>\n\n\n\n<p>Remember, nothing is persistent in the sandbox but you can use a configuration file to at least set the initial state. That's what I am doing. The first part of the file is mapping folders from my desktop to the sandbox.&nbsp; I want to have full access to my Scripts folder. To keep things simple I'm using the same folder path. I'm also mapping a folder to my local Pluralsight folder. This has files I need for my setup, which I'll get to in a moment. As a precaution from doing anything stupid, I am making this a read-only folder.<\/p>\n\n\n\n<p>I want to be able to easily copy and paste so I enable the clipboard. I'm also setting how much memory I want the sandbox to use. My desktop as 32GB of RAM so I can easily set aside 8GB. Now for the fun part.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Logon Command<\/h2>\n\n\n\n<p>You can define a command to run when the sandbox starts up.&nbsp; After a bit of testing and experimentation, I concluded the easiest solution was to create a batch cmd file. This file can then call all the other code I need for my configuration.<\/p>\n\n\n\n<pre class=\"wp-block-code lang:text mark:0 decode:true\"><code lang=\"bash\" class=\"language-bash\">REM sandbox-setup.cmd\nREM This code runs in the context of the Windows Sandbox\nREM Create my standard Work folder\nmkdir c:\\work\n\nREM set execution policy first so that a setup script can be run\npowershell.exe -command \"&amp;{Set-ExecutionPolicy RemoteSigned -force}\"\n\nREM Now run the true configuration script\npowershell.exe -file c:\\scripts\\sandbox-config.ps1\n<\/code><\/pre>\n\n\n\n<p>As I mentioned, the sandbox is locked down by default so I'm easing up on the restrictions to meet my needs. Such as setting the execution policy. The main configuration is done in the Sandox-config.ps1 file.<\/p>\n\n\n\n<pre class=\"wp-block-code lang:ps mark:0 decode:true\"><code lang=\"powershell\" class=\"language-powershell\">Enable-PSRemoting -force -SkipNetworkProfileCheck\n\nInstall-PackageProvider -name nuget -force -forcebootstrap -scope allusers\nUpdate-Module PackageManagement,PowerShellGet -force\n\n#run updates and installs in the background\nStart-Job {Install-Module PSScriptTools,PSTeachingTools -force}\nStart-Job {Install-Module PSReleaseTools -force; Install-PowerShell -mode quiet -enableremoting -EnableContextMenu}\nStart-Job {Install-Module WTToolbox -force ; Install-WTRelease}\nStart-Job -FilePath c:\\scripts\\install-vscodesandbox.ps1\nStart-Job -FilePath c:\\scripts\\Set-SandboxDesktop.ps1\n\n#wait for everything to finish\nGet-Job | Wait-Job\n<\/code><\/pre>\n\n\n\n<p>The first part of the script should be self-evident. The last part of the script kicks off a series of other scripts and commands as background jobs. The end of the script is waiting for all the jobs to finish, although that doesn't really do much since all of this runs \"behind the scenes\".<\/p>\n\n\n\n<p>I install some of my standard modules, include PSReleaseTools so that I can install PowerShell 7. I also install my WTToolbox module so that I can easily install Windows Terminal. Of course, I'd like to have VS Code, so that gets installed via a script.<\/p>\n\n\n\n<pre class=\"wp-block-code lang:ps mark:0 decode:true\"><code lang=\"powershell\" class=\"language-powershell\">#Install-VSCodeSandbox.ps1\n\n$file = Join-Path -path $env:temp -child 'VSCodeSetup-x64.exe'\nInvoke-WebRequest -Uri \"https:\/\/update.code.visualstudio.com\/latest\/win32-x64-user\/stable\" -OutFile $file -DisableKeepAlive -usebasicparsing\n\n$loadInf = '@\n[Setup]\nLang=english\nDir=C:\\Program Files\\Microsoft VS Code\nGroup=Visual Studio Code\nNoIcons=0\nTasks=desktopicon,addcontextmenufiles,addcontextmenufolders,addtopath\n@'\n\n$infPath = Join-Path -path $env:TEMP -child load.inf\n$loadInf | Out-File $infPath\n\nStart-Process -FilePath $file -ArgumentList \"\/VERYSILENT \/LOADINF=${infPath}\" -Wait\n\n#add extensions\nStart-Process -filepath \"C:\\Program Files\\Microsoft VS Code\\bin\\code.cmd\" -ArgumentList \"--install-extension ms-vscode.powerShell\"\n<\/code><\/pre>\n\n\n\n<p>The last step is to configure the desktop to meet my Pluralsight needs. This is primarily a metter of hiding some icons like the clock and setting a wallpaper.<\/p>\n\n\n\n<pre class=\"wp-block-code lang:ps mark:0 decode:true\"><code lang=\"powershell\" class=\"language-powershell\"># Set-SandboxDesktop.ps1\n# my Pluralsight related configuration\n\nfunction Update-Wallpaper {\n  [cmdletbinding(SupportsShouldProcess)]\r\n    Param(\r\n        [Parameter(Position = 0,HelpMessage=\"The path to the wallpaper file.\")]\r\n        [alias(\"wallpaper\")]\r\n        [ValidateScript({Test-Path $_})]\r\n        [string]$Path = $(Get-ItemPropertyValue -path 'hkcu:\\Control Panel\\Desktop\\' -name Wallpaper)\r\n    )\r\n\r\n    Add-Type @\"\r\n\r\n    using System;\r\n    using System.Runtime.InteropServices;\r\n    using Microsoft.Win32;\r\n\r\n    namespace Wallpaper\r\n    {\r\n        public class UpdateImage\r\n        {\r\n            [DllImport(\"user32.dll\", SetLastError = true, CharSet = CharSet.Auto)]\r\n\r\n            private static extern int SystemParametersInfo (int uAction, int uParam, string lpvParam, int fuWinIni);\r\n\r\n            public static void Refresh(string path)\r\n            {\r\n                SystemParametersInfo( 20, 0, path, 0x01 | 0x02 );\r\n            }\r\n        }\r\n    }\r\n\"@\r\n\r\n    if ($PSCmdlet.shouldProcess($path)) {\r\n        [Wallpaper.UpdateImage]::Refresh($Path)\r\n    }\r\n}\r\n\r\n#configure the taskbar and hide icons\r\n\r\nif (-not (Test-Path hkcu:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer)) {\r\n    [void](New-Item hkcu:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer)\r\n}\r\n\r\nSet-ItemProperty hkcu:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\ -Name Hideclock -Value 1\r\nSet-ItemProperty hkcu:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\ -Name HideSCAVolume -Value 1\r\nSet-ItemProperty hkcu:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\ -Name HideSCANetwork -Value 1\r\n\r\nif (-not (Test-Path hkcu:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced)) {\r\n    [void](New-Item hkcu:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced)\r\n}\r\n\r\nSet-ItemProperty hkcu:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced -Name HideIcons -Value 1\r\n\r\n#configure wallpaper\r\nSet-ItemProperty 'hkcu:\\Control Panel\\Desktop\\' -name Wallpaper -Value C:\\Pluralsight\\Wallpaper\\Pluralsight_Wallpaper_Fall_2015_Black.jpg\r\nSet-ItemProperty 'hkcu:\\Control Panel\\Desktop\\' -name WallpaperOriginX -value 0\r\nSet-ItemProperty 'hkcu:\\Control Panel\\Desktop\\' -name WallpaperOriginY -value 0\r\nSet-ItemProperty 'hkcu:\\Control Panel\\Desktop\\' -name WallpaperStyle -value 10\r\n\r\nUpdate-WallPaper\r\n\r\n&lt;# This doesn't work completely in newer versions of Windows 10 Invoke-Command {c:\\windows\\System32\\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters 1,True} #>\r\n#this is a bit harsh but it works\r\nGet-Process explorer | Stop-Process -force    <\/code><\/pre>\n\n\n\n<p>      How does all of this come together?<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Start-WindowsSandbox<\/h1>\n\n\n\n<p>I have a function loaded into my PowerShell profile that makes it easy to launch the Windows Sandbox.<\/p>\n\n\n\n<pre class=\"wp-block-code lang:ps mark:0 decode:true\"><code lang=\"powershell\" class=\"language-powershell\">Function Start-WindowsSandbox {\r\n    [cmdletbinding(DefaultParameterSetName = \"config\")]\r\n    [alias(\"wsb\")]\r\n    Param(\r\n        [Parameter(ParameterSetName = \"config\")]\r\n        [ValidateScript({Test-Path $_})]\r\n        [string]$Configuration = \"C:\\scripts\\WinSandBx.wsb\",\r\n        [Parameter(ParameterSetName = \"normal\")]\r\n        [switch]$NoSetup\r\n    )\r\n\r\n    Write-Verbose \"Starting $($myinvocation.mycommand)\"\r\n\r\n    if ($NoSetup) {\r\n        Write-Verbose \"Launching default WindowsSandbox.exe\"\r\n        c:\\windows\\system32\\WindowsSandbox.exe\r\n    }\r\n    else {\r\n        Write-Verbose \"Launching WindowsSandbox using configuration file $Configuration\"\r\n        Invoke-Item $Configuration\r\n    }\r\n\r\n    Write-Verbose \"Ending $($myinvocation.mycommand)\"\r\n}    <\/code><\/pre>\n\n\n\n<p>The default behavior is to use my customization file. Although I gave myself an option to start the sandbox with no customizations. The function has an alias of <em>wsb<\/em> which makes it very easy to run.<\/p>\n\n\n\n<p>When I run it, I get the Windows Sandbox with the default desktop. in the background my setup and configuration files are running. Within a minute or so the desktop changes to my Pluralsight&nbsp; background and I know I'm almost done. I might experiment with adding a <a href=\"https:\/\/github.com\/Windos\/BurntToast\" target=\"_blank\" rel=\"noopener noreferrer\">BurntToast<\/a> notification.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1037\" height=\"722\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/wsb-2.png\" alt=\"wsb-2\" class=\"wp-image-7624\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/wsb-2.png 1037w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/wsb-2-300x209.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/wsb-2-1024x713.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/wsb-2-768x535.png 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/wsb-2-850x592.png 850w\" sizes=\"auto, (max-width: 1037px) 100vw, 1037px\" \/><\/figure>\n\n\n\n<p>But now I have a sandbox configuration ready to go that meets my requirements. Yes, I have reduced the overall security but it is nothing that I can't live with.<\/p>\n\n\n\n<p>You are welcome to grab the code and try things out for yourself. As always, I'd love to hear what you think.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the reasons I was looking forward to updating to Windows 10 2004 was to have access to the Windows Sandbox feature. I think I tinkered with a pre-release version and was intrigued. I normally have a set of Hyper-V virtual machines that I can test with, but I&#8217;m always looking for something new&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"new on the blog: Doing More with Windows Sandbox and #PowerShell","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,8,608],"tags":[534,526,632,609],"class_list":["post-7621","post","type-post","status-publish","format-standard","hentry","category-powershell","category-scripting","category-windows-10","tag-powershell","tag-vscode","tag-windowssandbox","tag-windowsterminal"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Doing More with Windows Sandbox &#8226; The Lonely Administrator<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Doing More with Windows Sandbox &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"One of the reasons I was looking forward to updating to Windows 10 2004 was to have access to the Windows Sandbox feature. I think I tinkered with a pre-release version and was intrigued. I normally have a set of Hyper-V virtual machines that I can test with, but I&#039;m always looking for something new...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-29T19:35:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-30T20:49:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/little-boy-playing-in-the-sand-6459.jpg\" \/>\n<meta name=\"author\" content=\"Jeffery Hicks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:site\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeffery Hicks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7621\\\/doing-more-with-windows-sandbox\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7621\\\/doing-more-with-windows-sandbox\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Doing More with Windows Sandbox\",\"datePublished\":\"2020-07-29T19:35:36+00:00\",\"dateModified\":\"2020-09-30T20:49:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7621\\\/doing-more-with-windows-sandbox\\\/\"},\"wordCount\":826,\"commentCount\":12,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7621\\\/doing-more-with-windows-sandbox\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/little-boy-playing-in-the-sand-6459.jpg\",\"keywords\":[\"PowerShell\",\"VSCode\",\"WindowsSandbox\",\"WindowsTerminal\"],\"articleSection\":[\"PowerShell\",\"Scripting\",\"Windows 10\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7621\\\/doing-more-with-windows-sandbox\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7621\\\/doing-more-with-windows-sandbox\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7621\\\/doing-more-with-windows-sandbox\\\/\",\"name\":\"Doing More with Windows Sandbox &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7621\\\/doing-more-with-windows-sandbox\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7621\\\/doing-more-with-windows-sandbox\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/little-boy-playing-in-the-sand-6459.jpg\",\"datePublished\":\"2020-07-29T19:35:36+00:00\",\"dateModified\":\"2020-09-30T20:49:57+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7621\\\/doing-more-with-windows-sandbox\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7621\\\/doing-more-with-windows-sandbox\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7621\\\/doing-more-with-windows-sandbox\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/little-boy-playing-in-the-sand-6459.jpg\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/little-boy-playing-in-the-sand-6459.jpg\",\"width\":160,\"height\":106},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7621\\\/doing-more-with-windows-sandbox\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Doing More with Windows Sandbox\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/\",\"name\":\"The Lonely Administrator\",\"description\":\"Practical Advice for the Automating IT Pro\",\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\",\"name\":\"Jeffery Hicks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"caption\":\"Jeffery Hicks\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Doing More with Windows Sandbox &#8226; The Lonely Administrator","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/","og_locale":"en_US","og_type":"article","og_title":"Doing More with Windows Sandbox &#8226; The Lonely Administrator","og_description":"One of the reasons I was looking forward to updating to Windows 10 2004 was to have access to the Windows Sandbox feature. I think I tinkered with a pre-release version and was intrigued. I normally have a set of Hyper-V virtual machines that I can test with, but I'm always looking for something new...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/","og_site_name":"The Lonely Administrator","article_published_time":"2020-07-29T19:35:36+00:00","article_modified_time":"2020-09-30T20:49:57+00:00","og_image":[{"url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/little-boy-playing-in-the-sand-6459.jpg","type":"","width":"","height":""}],"author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Doing More with Windows Sandbox","datePublished":"2020-07-29T19:35:36+00:00","dateModified":"2020-09-30T20:49:57+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/"},"wordCount":826,"commentCount":12,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/little-boy-playing-in-the-sand-6459.jpg","keywords":["PowerShell","VSCode","WindowsSandbox","WindowsTerminal"],"articleSection":["PowerShell","Scripting","Windows 10"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/","name":"Doing More with Windows Sandbox &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/little-boy-playing-in-the-sand-6459.jpg","datePublished":"2020-07-29T19:35:36+00:00","dateModified":"2020-09-30T20:49:57+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/little-boy-playing-in-the-sand-6459.jpg","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/07\/little-boy-playing-in-the-sand-6459.jpg","width":160,"height":106},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7621\/doing-more-with-windows-sandbox\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"Doing More with Windows Sandbox"}]},{"@type":"WebSite","@id":"https:\/\/jdhitsolutions.com\/blog\/#website","url":"https:\/\/jdhitsolutions.com\/blog\/","name":"The Lonely Administrator","description":"Practical Advice for the Automating IT Pro","publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jdhitsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9","name":"Jeffery Hicks","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","caption":"Jeffery Hicks"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":8424,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8424\/hiding-taskbar-search-with-powershell\/","url_meta":{"origin":7621,"position":0},"title":"Hiding TaskBar Search with PowerShell","author":"Jeffery Hicks","date":"May 21, 2021","format":false,"excerpt":"Yesterday I shared a few PowerShell functions for configuring the Windows 10 taskbar to auto-hide. This works great in my virtual desktop when recording my Pluralsight courses. But even when hidden I would still get an annoying white sliver from the search box. So I got rid of that as\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/show-searchbox.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/show-searchbox.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/show-searchbox.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/show-searchbox.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":8420,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/","url_meta":{"origin":7621,"position":1},"title":"Managing the Windows 10 Taskbar with PowerShell","author":"Jeffery Hicks","date":"May 20, 2021","format":false,"excerpt":"When I'm working on a Pluralsight course, I tend to setup a virtual machine for recording. Although, lately I've been trying with Windows 10 Sandbox. This is handy when all I need is a Windows 10 desktop. When I setup the system, I have particular settings I need to configure.\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":7476,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7476\/open-windows-terminal-powershell-split-paned\/","url_meta":{"origin":7621,"position":2},"title":"Open Windows Terminal PowerShell Split Paned","author":"Jeffery Hicks","date":"May 14, 2020","format":false,"excerpt":"The other night I presented for the Mississippi PowerShell User Group on how to get started using Windows Terminal. This has been my go-to PowerShell console for quite a while. I use Windows Terminal for everything. During the talk a question came up about starting a session with split panes.\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wt-split.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wt-split.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wt-split.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wt-split.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wt-split.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":125,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/125\/windows-powershell-tfm-2nd-ed-on-amazon\/","url_meta":{"origin":7621,"position":3},"title":"Windows PowerShell: TFM 2nd Ed. on Amazon","author":"Jeffery Hicks","date":"December 18, 2007","format":false,"excerpt":"Amazon.com now has a page for the 2nd edition of Windows PowerShell: TFM. This is a different book, with a ton of new content.\u00a0 It has a separate ISBN, so make sure you are looking at http:\/\/www.amazon.com\/Windows-PowerShell-v1-0-TFM-2nd\/dp\/0977659763. The book shows out of stock right now, but you can still order.\u00a0\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6371,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6371\/making-the-leap-to-powershell-core\/","url_meta":{"origin":7621,"position":4},"title":"Making the Leap to PowerShell Core","author":"Jeffery Hicks","date":"January 9, 2019","format":false,"excerpt":"For years I have spent most of my time in a Windows PowerShell prompt. I have actually taken it as a badge of honor that I've been able to manage my day and all of my work from a PowerShell prompt. I also have created practically all of my content\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-11.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-11.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-11.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-11.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":917,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/917\/understanding-powershell-background-jobs\/","url_meta":{"origin":7621,"position":5},"title":"Understanding PowerShell Background Jobs","author":"Jeffery Hicks","date":"September 9, 2010","format":false,"excerpt":"Last night I spoke to the CNY .NET Developers Group about background jobs in Windows PowerShell. Even though the audience was primarily developers, I discussed jobs from an administrator's perspective, that is, using cmdlets. The job feature in PowerShell 2.0 is pretty amazing and you don't need any programming skills.\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=7621"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7621\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=7621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=7621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=7621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}