{"id":1884,"date":"2026-03-31T19:37:57","date_gmt":"2026-03-31T19:37:57","guid":{"rendered":"https:\/\/www.ultrexstaff.com\/?p=1884"},"modified":"2026-03-31T20:03:30","modified_gmt":"2026-03-31T20:03:30","slug":"deploying-google-drive-shared-drives-to-client-workstations","status":"publish","type":"post","link":"https:\/\/www.ultrexstaff.com\/?p=1884","title":{"rendered":"Deploying Google Drive Shared Drives to Client Workstations"},"content":{"rendered":"\n<p>When a client uses Google Workspace and needs their team to access Shared Drives from Windows workstations, we use a standardized PowerShell deployment script. This article walks through what the script does, how to use it, and what the end-user experience looks like.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Before running the script, make sure the following are in place:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Google Drive for Desktop<\/strong> must be installed on the workstation. Download it from <a href=\"https:\/\/dl.google.com\/drive-file-stream\/GoogleDriveSetup.exe\">https:\/\/dl.google.com\/drive-file-stream\/GoogleDriveSetup.exe<\/a> and run it before launching the script. The script will check for the installation and exit if it&#8217;s not found.<\/li>\n\n\n\n<li><strong>Administrator access<\/strong> on the target machine. The script uses <code>#Requires -RunAsAdministrator<\/code> and will not run without elevation.<\/li>\n\n\n\n<li><strong>User accounts<\/strong> must already exist on the machine. The script reads existing profiles from <code>C:\\Users<\/code> and lets you choose which ones to target.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">What the Script Does<\/h2>\n\n\n\n<p>The script (<code>Ultrex-Deploy-GoogleDrive.ps1<\/code>) performs four steps:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Verify Google Drive Installation<\/h3>\n\n\n\n<p>The script looks for <code>C:\\Program Files\\Google\\Drive File Stream\\launch.bat<\/code>. If it&#8217;s found, it moves on. If not, it displays the download link and exits so you can install it first and re-run.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Configure Auto-Start<\/h3>\n\n\n\n<p>It adds a registry entry under <code>HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run<\/code> so that Google Drive File Stream launches automatically when any user signs in. If the entry already exists, it skips this step.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Create the Launcher Script<\/h3>\n\n\n\n<p>A VBScript file is created at <code>C:\\InstallSharedDrive\\LaunchGoogleDrive.vbs<\/code>. This is the logic behind the desktop shortcut. When executed, it:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Checks if <code>GoogleDriveFS.exe<\/code> is already running.<\/li>\n\n\n\n<li>If not, launches it via <code>launch.bat<\/code> and waits up to 30 seconds for the mapped drive to appear.<\/li>\n\n\n\n<li>If the drive is mounted, it opens it in File Explorer.<\/li>\n\n\n\n<li>If the drive isn&#8217;t available (user hasn&#8217;t signed in yet), it displays a popup with step-by-step sign-in instructions directing them to the system tray icon.<\/li>\n<\/ol>\n\n\n\n<p>The drive letter is configurable \u2014 the script prompts you at the start (defaults to G:).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Deploy Desktop Shortcuts<\/h3>\n\n\n\n<p>Two shortcuts are placed on each selected user&#8217;s desktop:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Create Shared Drive<\/strong> \u2014 Uses the batch file icon. Runs the VBScript launcher, which starts Google Drive if needed and opens the mapped drive letter. This is the primary shortcut for users who need to reconnect or access their Shared Drive.<\/li>\n\n\n\n<li><strong>Google Drive<\/strong> \u2014 Uses the Google Drive icon. Simply launches Google Drive for Desktop. Useful if a user just needs to start the app or access settings.<\/li>\n<\/ul>\n\n\n\n<p>Both shortcuts are also placed in <code>C:\\Users\\Default\\Desktop<\/code> so that any future user accounts created on the machine will automatically receive them on first login.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">The Script<\/h2>\n\n\n\n<p>Copy the entire block below and paste it into the RMM PowerShell terminal.<\/p>\n\n\n\n<p>powershell<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Ultrex IT - Google Drive Shared Drive Deployment\n\n#Requires -RunAsAdministrator\n\n# --- CONFIGURATION -----------------------------------------------------------\n\n$DriveLetter = Read-Host \"Enter drive letter (default: G)\"\nif (&#91;string]::IsNullOrWhiteSpace($DriveLetter)) { $DriveLetter = \"G\" }\n$DriveLetter = $DriveLetter.TrimEnd(\":\", \" \").ToUpper()\n\nWrite-Host \"\"\nWrite-Host \"Available user profiles:\" -ForegroundColor Cyan\n$allProfiles = Get-ChildItem \"C:\\Users\" -Directory |\n    Where-Object { $_.Name -notmatch '^(Public|Default|Default User|All Users)$' } |\n    Select-Object -ExpandProperty Name\n\n$i = 0\nforeach ($p in $allProfiles) {\n    $i++\n    Write-Host \"  $i. $p\"\n}\nWrite-Host \"\"\nWrite-Host \"Enter user numbers separated by commas (e.g. 1,2,3)\" -ForegroundColor Cyan\nWrite-Host \"Or type 'all' to deploy to everyone\" -ForegroundColor Cyan\n$selection = Read-Host \"Selection\"\n\nif ($selection -eq \"all\") {\n    $TargetUsers = $allProfiles\n} else {\n    $indices = $selection -split \",\" | ForEach-Object { &#91;int]$_.Trim() - 1 }\n    $TargetUsers = @()\n    foreach ($idx in $indices) {\n        if ($idx -ge 0 -and $idx -lt $allProfiles.Count) {\n            $TargetUsers += $allProfiles&#91;$idx]\n        }\n    }\n}\n\nWrite-Host \"\"\nWrite-Host \"Deploying to: $($TargetUsers -join ', ')\" -ForegroundColor Green\nWrite-Host \"Drive letter: ${DriveLetter}:\\\" -ForegroundColor Green\nWrite-Host \"\"\n\n# --- STEP 1: Install Google Drive for Desktop --------------------------------\nWrite-Host \"--- Step 1: Google Drive for Desktop ---\" -ForegroundColor Cyan\n\n$driveExe = \"C:\\Program Files\\Google\\Drive File Stream\\launch.bat\"\n\nif (Test-Path $driveExe) {\n    Write-Host \"  &#91;OK]   Google Drive for Desktop found\" -ForegroundColor Green\n} else {\n    Write-Host \"  &#91;FAIL] Google Drive for Desktop is NOT installed\" -ForegroundColor Red\n    Write-Host \"\"\n    Write-Host \"  Please install Google Drive for Desktop before running this script.\" -ForegroundColor Yellow\n    Write-Host \"  Download from: https:\/\/dl.google.com\/drive-file-stream\/GoogleDriveSetup.exe\" -ForegroundColor Yellow\n    Write-Host \"\"\n    Read-Host \"  Press any key to exit...\"\n    exit\n}\n\nWrite-Host \"\"\n\n# --- STEP 2: Ensure Google Drive auto-starts for all users -------------------\nWrite-Host \"--- Step 2: Auto-Start Configuration ---\" -ForegroundColor Cyan\n\n$runKey = \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\"\n$existing = Get-ItemProperty $runKey -Name \"GoogleDriveFS\" -ErrorAction SilentlyContinue\n\nif ($existing) {\n    Write-Host \"  &#91;SKIP] Auto-start already configured\" -ForegroundColor Yellow\n} else {\n    try {\n        New-ItemProperty -Path $runKey -Name \"GoogleDriveFS\" `\n            -Value \"\"\"C:\\Program Files\\Google\\Drive File Stream\\launch.bat\"\"\" `\n            -PropertyType String -Force | Out-Null\n        Write-Host \"  &#91;OK]   Auto-start enabled for all users\" -ForegroundColor Green\n    } catch {\n        Write-Host \"  &#91;WARN] Could not set auto-start: $($_.Exception.Message)\" -ForegroundColor Yellow\n    }\n}\n\nWrite-Host \"\"\n\n# --- STEP 3: Create the launcher VBScript ------------------------------------\nWrite-Host \"--- Step 3: Creating Launcher Script ---\" -ForegroundColor Cyan\n\n$launcherDir = \"C:\\InstallSharedDrive\"\n$launcherScript = \"$launcherDir\\LaunchGoogleDrive.vbs\"\n\nif (-not (Test-Path $launcherDir)) {\n    New-Item -Path $launcherDir -ItemType Directory -Force | Out-Null\n}\n\n$vbsContent = @\"\nSet objShell = CreateObject(\"WScript.Shell\")\nSet objFSO = CreateObject(\"Scripting.FileSystemObject\")\n\n' Check if Google Drive is already running\nSet objWMI = GetObject(\"winmgmts:\\\\.\\root\\cimv2\")\nSet colProcesses = objWMI.ExecQuery(\"SELECT * FROM Win32_Process WHERE Name = 'GoogleDriveFS.exe'\")\n\nIf colProcesses.Count = 0 Then\n    driveExe = \"C:\\Program Files\\Google\\Drive File Stream\\launch.bat\"\n    If objFSO.FileExists(driveExe) Then\n        objShell.Run \"\"\"\" &amp; driveExe &amp; \"\"\"\", 0, False\n        WScript.Sleep 5000\n        attempts = 0\n        Do While Not objFSO.DriveExists(\"${DriveLetter}:\") And attempts &lt; 25\n            WScript.Sleep 1000\n            attempts = attempts + 1\n        Loop\n    Else\n        MsgBox \"Google Drive is not installed.\" &amp; vbCrLf &amp; \"Please contact Ultrex IT support.\", vbExclamation, \"Google Drive\"\n        WScript.Quit\n    End If\nEnd If\n\nIf objFSO.DriveExists(\"${DriveLetter}:\") Then\n    objShell.Run \"explorer.exe ${DriveLetter}:\\\"\nElse\n    MsgBox \"Google Drive is not ready yet.\" &amp; vbCrLf &amp; vbCrLf &amp; \"To sign in:\" &amp; vbCrLf &amp; \"1. Look for the Google Drive icon in the system tray (bottom right)\" &amp; vbCrLf &amp; \"2. Click it and sign in with your Google account\" &amp; vbCrLf &amp; \"3. Once signed in, click this shortcut again\" &amp; vbCrLf &amp; vbCrLf &amp; \"Need help? Contact Ultrex IT.\", vbExclamation, \"Google Drive\"\nEnd If\n\"@\n\nSet-Content -Path $launcherScript -Value $vbsContent -Force\nWrite-Host \"  &#91;OK]   Launcher script created at $launcherScript\" -ForegroundColor Green\n\nWrite-Host \"\"\n\n# --- STEP 4: Deploy shortcuts ------------------------------------------------\nWrite-Host \"--- Step 4: Deploying Desktop Shortcuts ---\" -ForegroundColor Cyan\n\n$iconPath = \"C:\\Program Files\\Google\\Drive File Stream\\drive_fs.ico\"\nif (-not (Test-Path $iconPath)) {\n    $found = Get-ChildItem \"C:\\Program Files\\Google\\Drive File Stream\" -Filter \"*.ico\" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1\n    if ($found) { $iconPath = $found.FullName }\n}\n\n$desktops = @()\nforeach ($user in $TargetUsers) {\n    $desktops += @{ Path = \"C:\\Users\\$user\\Desktop\"; Name = $user }\n}\n$desktops += @{ Path = \"C:\\Users\\Default\\Desktop\"; Name = \"Default\" }\n\nforeach ($entry in $desktops) {\n    $desktop = $entry.Path\n    $displayName = $entry.Name\n\n    try {\n        if (-not (Test-Path $desktop)) {\n            New-Item -Path $desktop -ItemType Directory -Force | Out-Null\n        }\n\n        Remove-Item \"$desktop\\Google Drive G.lnk\" -Force -ErrorAction SilentlyContinue\n\n        $wshShell = New-Object -ComObject WScript.Shell\n\n        $shortcut = $wshShell.CreateShortcut(\"$desktop\\Create Shared Drive.lnk\")\n        $shortcut.TargetPath = \"wscript.exe\"\n        $shortcut.Arguments = \"\"\"$launcherScript\"\"\"\n        $shortcut.WorkingDirectory = $launcherDir\n        $shortcut.Description = \"Launch Google Drive and open ${DriveLetter}:\\\"\n        $shortcut.IconLocation = \"C:\\Program Files\\Google\\Drive File Stream\\launch.bat,0\"\n        $shortcut.Save()\n\n        $shortcut2 = $wshShell.CreateShortcut(\"$desktop\\Google Drive.lnk\")\n        $shortcut2.TargetPath = \"C:\\Program Files\\Google\\Drive File Stream\\launch.bat\"\n        $shortcut2.Description = \"Google Drive\"\n        if (Test-Path $iconPath) {\n            $shortcut2.IconLocation = \"$iconPath,0\"\n        }\n        $shortcut2.Save()\n\n        Write-Host \"  &#91;OK]   $displayName\" -ForegroundColor Green\n    } catch {\n        Write-Host \"  &#91;FAIL] $displayName - $($_.Exception.Message)\" -ForegroundColor Red\n    }\n}\n\nWrite-Host \"\"\nWrite-Host \"=== Deployment Complete ===\" -ForegroundColor Cyan\nWrite-Host \"\"\nWrite-Host \"  Drive:      ${DriveLetter}:\\\" -ForegroundColor Gray\nWrite-Host \"  Users:      $($TargetUsers.Count) + Default profile\" -ForegroundColor Gray\nWrite-Host \"  Auto-start: Enabled\" -ForegroundColor Gray\nWrite-Host \"  Launcher:   $launcherScript\" -ForegroundColor Gray\nWrite-Host \"\"\nWrite-Host \"  Each user must sign in to Google Drive on first use.\" -ForegroundColor Yellow\nWrite-Host \"  They click the system tray icon and authenticate with their Google account.\" -ForegroundColor Yellow\nWrite-Host \"\"\nWrite-Host \"  Ultrex IT - deployment complete\" -ForegroundColor Cyan<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">How to Run It<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Confirm Google Drive for Desktop is already installed on the target machine. If not, push the installer first via RMM or install it manually during a remote session.<\/li>\n\n\n\n<li>Open the RMM PowerShell terminal for the target device (e.g., Atera \u2192 Manage \u2192 Terminal \u2192 PowerShell).<\/li>\n\n\n\n<li>Copy the entire contents of <code>Ultrex-Deploy-GoogleDrive.ps1<\/code> and paste it into the RMM PowerShell session.<\/li>\n\n\n\n<li>The script will prompt for two things directly in the terminal:\n<ul class=\"wp-block-list\">\n<li><strong>Drive letter<\/strong> \u2014 Press Enter to accept the default (G), or type a different letter if needed.<\/li>\n\n\n\n<li><strong>User selection<\/strong> \u2014 The script lists all user profiles on the machine. Enter the numbers separated by commas (e.g., <code>1,3,5,7<\/code>) or type <code>all<\/code> to deploy to every profile.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>The script runs through all four steps and reports success or failure for each user.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Example Session<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Enter drive letter (default: G):\n&#91;Enter]\n\nAvailable user profiles:\n  1. anniek\n  2. christinaw\n  3. davec\n  4. ginaa\n  5. jamesa\n\nEnter user numbers separated by commas (e.g. 1,2,3)\nOr type 'all' to deploy to everyone\nSelection: all\n\nDeploying to: anniek, christinaw, davec, ginaa, jamesa\nDrive letter: G:\\\n\n--- Step 1: Google Drive for Desktop ---\n  &#91;OK]   Google Drive for Desktop found\n\n--- Step 2: Auto-Start Configuration ---\n  &#91;OK]   Auto-start enabled for all users\n\n--- Step 3: Creating Launcher Script ---\n  &#91;OK]   Launcher script created at C:\\InstallSharedDrive\\LaunchGoogleDrive.vbs\n\n--- Step 4: Deploying Desktop Shortcuts ---\n  &#91;OK]   anniek\n  &#91;OK]   christinaw\n  &#91;OK]   davec\n  &#91;OK]   ginaa\n  &#91;OK]   jamesa\n  &#91;OK]   Default\n\n=== Deployment Complete ===<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">End-User Experience<\/h2>\n\n\n\n<p>After deployment, each user will see two new icons on their desktop. Here&#8217;s what their first-time experience looks like:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>User signs in to Windows.<\/li>\n\n\n\n<li>Google Drive for Desktop auto-launches (via the registry Run key).<\/li>\n\n\n\n<li>The Google Drive system tray icon appears (bottom-right of the taskbar).<\/li>\n\n\n\n<li>User clicks the <strong>&#8220;Create Shared Drive&#8221;<\/strong> shortcut on their desktop.<\/li>\n\n\n\n<li>If they haven&#8217;t signed in to Google yet, a popup appears with instructions to click the system tray icon and authenticate with their Google account.<\/li>\n\n\n\n<li>After signing in, the G: drive mounts automatically.<\/li>\n\n\n\n<li>Clicking &#8220;Create Shared Drive&#8221; again opens G:\\ in File Explorer.<\/li>\n<\/ol>\n\n\n\n<p>From that point forward, Drive auto-starts on login, G: mounts automatically, and the shortcut just opens the drive.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<p><strong>Script exits immediately saying Google Drive is not installed<\/strong> Install Google Drive for Desktop first, then re-run the script. The installer can be downloaded from the URL shown in the error message.<\/p>\n\n\n\n<p><strong>Shortcuts appear but the drive letter never mounts<\/strong> The user needs to sign in to Google Drive. Have them click the Google Drive icon in the system tray and authenticate with their Google Workspace account.<\/p>\n\n\n\n<p><strong>Drive mounts as a different letter than expected<\/strong> Google Drive for Desktop assigns the drive letter automatically. If G: is already taken, it may use H: or another letter. You can re-run the script with the correct letter, or configure the drive letter in Google Drive&#8217;s settings (system tray icon \u2192 Preferences \u2192 Google Drive \u2192 Drive letter).<\/p>\n\n\n\n<p><strong>Shortcuts don&#8217;t appear for a new user account<\/strong> The script deploys to the Default profile, so new accounts should get the shortcuts automatically. If they don&#8217;t, re-run the script and select the new user.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">File Locations<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Item<\/th><th>Path<\/th><\/tr><\/thead><tbody><tr><td>Deployment script<\/td><td><code>Ultrex-Deploy-GoogleDrive.ps1<\/code><\/td><\/tr><tr><td>VBScript launcher<\/td><td><code>C:\\InstallSharedDrive\\LaunchGoogleDrive.vbs<\/code><\/td><\/tr><tr><td>Auto-start registry key<\/td><td><code>HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\GoogleDriveFS<\/code><\/td><\/tr><tr><td>Google Drive installation<\/td><td><code>C:\\Program Files\\Google\\Drive File Stream\\<\/code><\/td><\/tr><tr><td>User shortcuts<\/td><td><code>C:\\Users\\&lt;username&gt;\\Desktop\\Create Shared Drive.lnk<\/code><\/td><\/tr><tr><td>Default profile shortcut<\/td><td><code>C:\\Users\\Default\\Desktop\\Create Shared Drive.lnk<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>When a client uses Google Workspace and needs their team to access Shared Drives from Windows workstations, we use a standardized PowerShell deployment script. This article walks through what the script does, how to use it, and what the end-user experience looks like. Prerequisites Before running the script, make sure the following are in place: [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[112,118,98,137],"tags":[134,133,136,135],"class_list":["post-1884","post","type-post","status-publish","format-standard","hentry","category-google-workspace","category-installation-guides","category-it-knowledge-base-articles","category-powershell","tag-drive","tag-google","tag-google-workspace","tag-shareddrive","post-preview"],"_links":{"self":[{"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/posts\/1884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1884"}],"version-history":[{"count":1,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/posts\/1884\/revisions"}],"predecessor-version":[{"id":1885,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/posts\/1884\/revisions\/1885"}],"wp:attachment":[{"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}