Category: Google Workspace

Deploying Google Drive Shared Drives to Client Workstations

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:

  • Google Drive for Desktop must be installed on the workstation. Download it from https://dl.google.com/drive-file-stream/GoogleDriveSetup.exe and run it before launching the script. The script will check for the installation and exit if it’s not found.
  • Administrator access on the target machine. The script uses #Requires -RunAsAdministrator and will not run without elevation.
  • User accounts must already exist on the machine. The script reads existing profiles from C:\Users and lets you choose which ones to target.

What the Script Does

The script (Ultrex-Deploy-GoogleDrive.ps1) performs four steps:

Step 1: Verify Google Drive Installation

The script looks for C:\Program Files\Google\Drive File Stream\launch.bat. If it’s found, it moves on. If not, it displays the download link and exits so you can install it first and re-run.

Step 2: Configure Auto-Start

It adds a registry entry under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run so that Google Drive File Stream launches automatically when any user signs in. If the entry already exists, it skips this step.

Step 3: Create the Launcher Script

A VBScript file is created at C:\InstallSharedDrive\LaunchGoogleDrive.vbs. This is the logic behind the desktop shortcut. When executed, it:

  1. Checks if GoogleDriveFS.exe is already running.
  2. If not, launches it via launch.bat and waits up to 30 seconds for the mapped drive to appear.
  3. If the drive is mounted, it opens it in File Explorer.
  4. If the drive isn’t available (user hasn’t signed in yet), it displays a popup with step-by-step sign-in instructions directing them to the system tray icon.

The drive letter is configurable — the script prompts you at the start (defaults to G:).

Step 4: Deploy Desktop Shortcuts

Two shortcuts are placed on each selected user’s desktop:

  • Create Shared Drive — 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.
  • Google Drive — Uses the Google Drive icon. Simply launches Google Drive for Desktop. Useful if a user just needs to start the app or access settings.

Both shortcuts are also placed in C:\Users\Default\Desktop so that any future user accounts created on the machine will automatically receive them on first login.


The Script

Copy the entire block below and paste it into the RMM PowerShell terminal.

powershell

# Ultrex IT - Google Drive Shared Drive Deployment

#Requires -RunAsAdministrator

# --- CONFIGURATION -----------------------------------------------------------

$DriveLetter = Read-Host "Enter drive letter (default: G)"
if ([string]::IsNullOrWhiteSpace($DriveLetter)) { $DriveLetter = "G" }
$DriveLetter = $DriveLetter.TrimEnd(":", " ").ToUpper()

Write-Host ""
Write-Host "Available user profiles:" -ForegroundColor Cyan
$allProfiles = Get-ChildItem "C:\Users" -Directory |
    Where-Object { $_.Name -notmatch '^(Public|Default|Default User|All Users)$' } |
    Select-Object -ExpandProperty Name

$i = 0
foreach ($p in $allProfiles) {
    $i++
    Write-Host "  $i. $p"
}
Write-Host ""
Write-Host "Enter user numbers separated by commas (e.g. 1,2,3)" -ForegroundColor Cyan
Write-Host "Or type 'all' to deploy to everyone" -ForegroundColor Cyan
$selection = Read-Host "Selection"

if ($selection -eq "all") {
    $TargetUsers = $allProfiles
} else {
    $indices = $selection -split "," | ForEach-Object { [int]$_.Trim() - 1 }
    $TargetUsers = @()
    foreach ($idx in $indices) {
        if ($idx -ge 0 -and $idx -lt $allProfiles.Count) {
            $TargetUsers += $allProfiles[$idx]
        }
    }
}

Write-Host ""
Write-Host "Deploying to: $($TargetUsers -join ', ')" -ForegroundColor Green
Write-Host "Drive letter: ${DriveLetter}:\" -ForegroundColor Green
Write-Host ""

# --- STEP 1: Install Google Drive for Desktop --------------------------------
Write-Host "--- Step 1: Google Drive for Desktop ---" -ForegroundColor Cyan

$driveExe = "C:\Program Files\Google\Drive File Stream\launch.bat"

if (Test-Path $driveExe) {
    Write-Host "  [OK]   Google Drive for Desktop found" -ForegroundColor Green
} else {
    Write-Host "  [FAIL] Google Drive for Desktop is NOT installed" -ForegroundColor Red
    Write-Host ""
    Write-Host "  Please install Google Drive for Desktop before running this script." -ForegroundColor Yellow
    Write-Host "  Download from: https://dl.google.com/drive-file-stream/GoogleDriveSetup.exe" -ForegroundColor Yellow
    Write-Host ""
    Read-Host "  Press any key to exit..."
    exit
}

Write-Host ""

# --- STEP 2: Ensure Google Drive auto-starts for all users -------------------
Write-Host "--- Step 2: Auto-Start Configuration ---" -ForegroundColor Cyan

$runKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
$existing = Get-ItemProperty $runKey -Name "GoogleDriveFS" -ErrorAction SilentlyContinue

if ($existing) {
    Write-Host "  [SKIP] Auto-start already configured" -ForegroundColor Yellow
} else {
    try {
        New-ItemProperty -Path $runKey -Name "GoogleDriveFS" `
            -Value """C:\Program Files\Google\Drive File Stream\launch.bat""" `
            -PropertyType String -Force | Out-Null
        Write-Host "  [OK]   Auto-start enabled for all users" -ForegroundColor Green
    } catch {
        Write-Host "  [WARN] Could not set auto-start: $($_.Exception.Message)" -ForegroundColor Yellow
    }
}

Write-Host ""

# --- STEP 3: Create the launcher VBScript ------------------------------------
Write-Host "--- Step 3: Creating Launcher Script ---" -ForegroundColor Cyan

$launcherDir = "C:\InstallSharedDrive"
$launcherScript = "$launcherDir\LaunchGoogleDrive.vbs"

if (-not (Test-Path $launcherDir)) {
    New-Item -Path $launcherDir -ItemType Directory -Force | Out-Null
}

$vbsContent = @"
Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")

' Check if Google Drive is already running
Set objWMI = GetObject("winmgmts:\\.\root\cimv2")
Set colProcesses = objWMI.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'GoogleDriveFS.exe'")

If colProcesses.Count = 0 Then
    driveExe = "C:\Program Files\Google\Drive File Stream\launch.bat"
    If objFSO.FileExists(driveExe) Then
        objShell.Run """" & driveExe & """", 0, False
        WScript.Sleep 5000
        attempts = 0
        Do While Not objFSO.DriveExists("${DriveLetter}:") And attempts < 25
            WScript.Sleep 1000
            attempts = attempts + 1
        Loop
    Else
        MsgBox "Google Drive is not installed." & vbCrLf & "Please contact Ultrex IT support.", vbExclamation, "Google Drive"
        WScript.Quit
    End If
End If

If objFSO.DriveExists("${DriveLetter}:") Then
    objShell.Run "explorer.exe ${DriveLetter}:\"
Else
    MsgBox "Google Drive is not ready yet." & vbCrLf & vbCrLf & "To sign in:" & vbCrLf & "1. Look for the Google Drive icon in the system tray (bottom right)" & vbCrLf & "2. Click it and sign in with your Google account" & vbCrLf & "3. Once signed in, click this shortcut again" & vbCrLf & vbCrLf & "Need help? Contact Ultrex IT.", vbExclamation, "Google Drive"
End If
"@

Set-Content -Path $launcherScript -Value $vbsContent -Force
Write-Host "  [OK]   Launcher script created at $launcherScript" -ForegroundColor Green

Write-Host ""

# --- STEP 4: Deploy shortcuts ------------------------------------------------
Write-Host "--- Step 4: Deploying Desktop Shortcuts ---" -ForegroundColor Cyan

$iconPath = "C:\Program Files\Google\Drive File Stream\drive_fs.ico"
if (-not (Test-Path $iconPath)) {
    $found = Get-ChildItem "C:\Program Files\Google\Drive File Stream" -Filter "*.ico" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
    if ($found) { $iconPath = $found.FullName }
}

$desktops = @()
foreach ($user in $TargetUsers) {
    $desktops += @{ Path = "C:\Users\$user\Desktop"; Name = $user }
}
$desktops += @{ Path = "C:\Users\Default\Desktop"; Name = "Default" }

foreach ($entry in $desktops) {
    $desktop = $entry.Path
    $displayName = $entry.Name

    try {
        if (-not (Test-Path $desktop)) {
            New-Item -Path $desktop -ItemType Directory -Force | Out-Null
        }

        Remove-Item "$desktop\Google Drive G.lnk" -Force -ErrorAction SilentlyContinue

        $wshShell = New-Object -ComObject WScript.Shell

        $shortcut = $wshShell.CreateShortcut("$desktop\Create Shared Drive.lnk")
        $shortcut.TargetPath = "wscript.exe"
        $shortcut.Arguments = """$launcherScript"""
        $shortcut.WorkingDirectory = $launcherDir
        $shortcut.Description = "Launch Google Drive and open ${DriveLetter}:\"
        $shortcut.IconLocation = "C:\Program Files\Google\Drive File Stream\launch.bat,0"
        $shortcut.Save()

        $shortcut2 = $wshShell.CreateShortcut("$desktop\Google Drive.lnk")
        $shortcut2.TargetPath = "C:\Program Files\Google\Drive File Stream\launch.bat"
        $shortcut2.Description = "Google Drive"
        if (Test-Path $iconPath) {
            $shortcut2.IconLocation = "$iconPath,0"
        }
        $shortcut2.Save()

        Write-Host "  [OK]   $displayName" -ForegroundColor Green
    } catch {
        Write-Host "  [FAIL] $displayName - $($_.Exception.Message)" -ForegroundColor Red
    }
}

Write-Host ""
Write-Host "=== Deployment Complete ===" -ForegroundColor Cyan
Write-Host ""
Write-Host "  Drive:      ${DriveLetter}:\" -ForegroundColor Gray
Write-Host "  Users:      $($TargetUsers.Count) + Default profile" -ForegroundColor Gray
Write-Host "  Auto-start: Enabled" -ForegroundColor Gray
Write-Host "  Launcher:   $launcherScript" -ForegroundColor Gray
Write-Host ""
Write-Host "  Each user must sign in to Google Drive on first use." -ForegroundColor Yellow
Write-Host "  They click the system tray icon and authenticate with their Google account." -ForegroundColor Yellow
Write-Host ""
Write-Host "  Ultrex IT - deployment complete" -ForegroundColor Cyan

How to Run It

  1. 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.
  2. Open the RMM PowerShell terminal for the target device (e.g., Atera → Manage → Terminal → PowerShell).
  3. Copy the entire contents of Ultrex-Deploy-GoogleDrive.ps1 and paste it into the RMM PowerShell session.
  4. The script will prompt for two things directly in the terminal:
    • Drive letter — Press Enter to accept the default (G), or type a different letter if needed.
    • User selection — The script lists all user profiles on the machine. Enter the numbers separated by commas (e.g., 1,3,5,7) or type all to deploy to every profile.
  5. The script runs through all four steps and reports success or failure for each user.

Example Session

Enter drive letter (default: G):
[Enter]

Available user profiles:
  1. anniek
  2. christinaw
  3. davec
  4. ginaa
  5. jamesa

Enter user numbers separated by commas (e.g. 1,2,3)
Or type 'all' to deploy to everyone
Selection: all

Deploying to: anniek, christinaw, davec, ginaa, jamesa
Drive letter: G:\

--- Step 1: Google Drive for Desktop ---
  [OK]   Google Drive for Desktop found

--- Step 2: Auto-Start Configuration ---
  [OK]   Auto-start enabled for all users

--- Step 3: Creating Launcher Script ---
  [OK]   Launcher script created at C:\InstallSharedDrive\LaunchGoogleDrive.vbs

--- Step 4: Deploying Desktop Shortcuts ---
  [OK]   anniek
  [OK]   christinaw
  [OK]   davec
  [OK]   ginaa
  [OK]   jamesa
  [OK]   Default

=== Deployment Complete ===

End-User Experience

After deployment, each user will see two new icons on their desktop. Here’s what their first-time experience looks like:

  1. User signs in to Windows.
  2. Google Drive for Desktop auto-launches (via the registry Run key).
  3. The Google Drive system tray icon appears (bottom-right of the taskbar).
  4. User clicks the “Create Shared Drive” shortcut on their desktop.
  5. If they haven’t signed in to Google yet, a popup appears with instructions to click the system tray icon and authenticate with their Google account.
  6. After signing in, the G: drive mounts automatically.
  7. Clicking “Create Shared Drive” again opens G:\ in File Explorer.

From that point forward, Drive auto-starts on login, G: mounts automatically, and the shortcut just opens the drive.


Troubleshooting

Script exits immediately saying Google Drive is not installed Install Google Drive for Desktop first, then re-run the script. The installer can be downloaded from the URL shown in the error message.

Shortcuts appear but the drive letter never mounts 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.

Drive mounts as a different letter than expected 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’s settings (system tray icon → Preferences → Google Drive → Drive letter).

Shortcuts don’t appear for a new user account The script deploys to the Default profile, so new accounts should get the shortcuts automatically. If they don’t, re-run the script and select the new user.


File Locations

ItemPath
Deployment scriptUltrex-Deploy-GoogleDrive.ps1
VBScript launcherC:\InstallSharedDrive\LaunchGoogleDrive.vbs
Auto-start registry keyHKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\GoogleDriveFS
Google Drive installationC:\Program Files\Google\Drive File Stream\
User shortcutsC:\Users\<username>\Desktop\Create Shared Drive.lnk
Default profile shortcutC:\Users\Default\Desktop\Create Shared Drive.lnk

Explaining to clients account deletion options

There are a few options for when email accounts are deleted- feel free to let me know which you’d like:

We delete the email fully. Emails in the users inbox go away, and people emailing this address later get a “no such user” error. (not recommended). We don’t often recommend this option, but it is an option.
We delete the user, but make the email a forwarding address- this removes all emails that were in the current inbox, but makes any future emails to that address go to whatever current staffer is taking over that role. So the perk is future emails to the address are seen by whoever you assign them to, the downside is that former emails no longer exist.
We turn the user into a shared mailbox. This retains all former emails of that user, but then turns it into a shared mailbox that can be accessed by other users. In this case, emails sent in the future to this address will go into that shared mailbox, so it’s best practice to set an autoreply that you like, so that anyone emailing in the future gets the notification of who they should contact instead. If you ever need to get into the shared mailbox to retrieve a former staffers email, we would help you do that.

All three of these are cost you nothing and don’t need any license. The only downside of the shared mailbox option is that the emails retained in that box count against the 50 or 100 gig limit of whatever user then “owns” that shared mailbox. So after a long enough time of that person being gone, we then recommend having us remove even the shared mailbox (depending on company size, usually after 1-2 years if more than enough).

Thoughts? Whichever you like, we’ll do that. 🙂 And if you write a little auto-reply, we’ll use whatever you send each time. Otherwise, the default reply from MS365 when it’s been turned into a shared mailbox is:

“Thank you for contacting ‎”Company Name”‎. We regret to inform you that “Staffer Name” is no longer employed here. Please direct any future correspondence to ‎”Whatever staff you tell me to give their email to”‎ at “That staffers email address”‎.

This is an automated reply. “

Hope all this helps, feel free to call with any questions if you have them- I live to serve :)Explaining to clients account deletion options

How to enable external email communication for a specific user in Google Groups when Organizational Unit is more restricted

How to enable external email communication for a specific user in Google Groups

Raised from ticket #2159

If you need to allow a specific user to receive external emails for a limited time, follow these steps:

  1. Create a New Group with External Communication Permissions:
    • Access the Google Admin Console: Navigate to admin.google.com and sign in with your administrator credentials.
    • In the Admin Console, go to Groups.
    • Click on Create group.
    • Enter the group’s name, email address, and description.
    • Set Group Access Permissions:
      • Allow external members if needed.
      • Permit external users to send emails to the group.
      • Set viewing permissions according to your requirements.
    • Click Create group to finalize.
  2. Add the User to the New Group:
    • In the Admin Console, navigate to Groups.
    • Select the newly created group.
    • Click on Members.
    • Click Add members.
    • Enter the user’s email address and assign the appropriate role (e.g., Member).
    • Click Add to group.
  3. Ensure No Conflict with Original Group:
    • Review the original Organizational Unit’s settings in Apps > Gmail > Compliance to confirm that external communication is restricted.
    • Ensure that the user’s membership in the new group does not grant them unintended permissions in the original Organizational Unit.
  4. Monitor and Adjust as Needed:
    • Regularly review the group’s activity to ensure that external communications are functioning as intended.
    • If any issues arise, revisit the group settings to make necessary adjustments.

By following these steps, you can successfully enable a specific user to communicate externally while maintaining their membership in a group with restricted external communication.

How to set up DKIM and SPF for DNS records in Google Workspace

How to set up DKIM and SPF for DNS records in Google Workspace

Raised from ticket #2059

If you are experiencing issues with your emails being marked as spam, setting up DKIM (DomainKeys Identified Mail) and SPF (Sender Policy Framework) records can help improve your email deliverability. Follow these steps to configure these records:

Setting Up DKIM

  1. Access the Google Admin Console: Sign in to your Google Admin console using your administrator account.
  2. Navigate to: Apps > Google Workspace > Gmail.
  3. Authenticate Email: Click on Authenticate email.
  4. Generate a DKIM Key:
    • Select your domain from the dropdown.
    • Click on Generate new record.
    • Choose your DKIM key settings:
      • DKIM key bit length: Choose 2048-bit for better security.
      • Prefix selector: Use the default ‘google’ if this is your first setup.
    • Click Generate.
  5. Add the DKIM Key to Your DNS Records:
    • Log in to your domain host’s DNS management console.
    • Add a new TXT record with the following details:
      • Host/Name: Enter the TXT record name provided (e.g., google._domainkey).
      • Value: Paste the TXT record value generated in the Admin console.
    • Save the changes.
  6. Activate DKIM Signing:
    • Return to the Google Admin console.
    • Select your domain in the Authenticate email section.
    • Click on Start authentication.
    • The status should update to Authenticating email with DKIM.

Note: DNS changes can take up to 48 hours to propagate.

Setting Up SPF

To set up SPF, you will need to add a TXT record to your DNS settings:

  1. Log in to your domain host’s DNS management console.
  2. Add a new TXT record with the following details:
    • Host/Name: @ (or your domain name)
    • Value: v=spf1 include:_spf.google.com ~all
  3. Save the changes.

By following these steps, you can enhance your email security and reduce the likelihood of your emails being marked as spam.

Google Workspace Data Export Tool vs Google Takeout (For Admins)

Google Workspace Data Export Tool vs Google Takeout (For Admins)

🛠️ Google Workspace Data Export Tool (For Admins)

This tool allows super administrators to export data for the entire organization or specific users.

🧠 Summary

  • Use the Data Export Tool for organization-wide data exports or when a user is not available / doesn’t make sense to change their password and prevent their account access while we export.
  • Use Google Takeout when users are available and need to export their own data.

✅ Prerequisites for Admin Data Export

  • You must be a super administrator.
  • The admin account must be at least 30 days old.
  • 2-Step Verification must be enabled for the admin account.
  • The organization must have fewer than 1,000 users.

📋 Steps to Export Data

  1. Sign in to the Google Admin console.
  2. Navigate to Data > Data Export.
  3. Click Start Export.
  4. You’ll receive an email confirming the export has started.
  5. After approximately 48 hours, you’ll receive another email with a link to download the data from a Google Cloud Storage bucket or can navigate back to the Data Export list and download the results.
  6. https://admin.google.com/ac/customertakeout

⚠️ Important Considerations

  • The export process can take up to 14 days, depending on the amount of data.
  • The exported data is available for 30 days in the Cloud Storage bucket.
  • Ensure you download the data before it is automatically deleted.

👤 Google Takeout (For Individual Users)

Google Takeout allows users to export their own data from various Google services.

✅ Prerequisites for Google Takeout

  • The user must have access to their Google account.
  • Admins can control if/which services are available for export via the Admin Console.

📋 Steps to Export Data

  1. Visit Google Takeout takeout.google.com and sign into the account you need data from
  2. Select the Google services you want to export data from.
  3. Click Next Step.
  4. Choose the delivery method (e.g., download link via email, add to Drive, Dropbox, etc.).
  5. Select the export frequency, file type, and size.
  6. Click Create Export.
  7. You’ll receive an email in the user’s inbox when your export is ready.

⚠️ Important Considerations

  • The time it takes to prepare the export depends on the amount of data; it can range from minutes to days.
  • Download links are available for 7 days.
  • Some services may have limitations on the number of exports per day.

© 2026 Ultrex Staff

Theme by Anders NorenUp ↑