Category: Installation Guides (Page 1 of 3)

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

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.

SentinelOne force removal of issues

Updated Notes for the Ultrex Process:

Plug pen drive into computer, and copy the TEMP folder to the C drive- should contain this note doc, and two installer files (Exe and MSI)

Reboot the computer into safe mode (Hold Shift and click reboot- keep holding shift until you are presented with the troubleshooting steps- pick startup items, reboot into safe mode).

Once in Safe Mode, open a command prompt window and navigate to C:\Temp using

Cd..

Cd..

cd C:\Temp

Run the following command:

SentinelOneInstaller_windows_64bit_v25_1_3_334.exe -c -t eyJ1cmwiOiAiaHR0cHM6Ly91c2VhMS1jdzA0bWRyLnNlbnRpbmVsb25lLm5ldCIsICJzaXRlX2tleSI6ICI1YmZmNWU1NDI1YTJlZmJjIn0=

Wait until the cleaner process is finished

Reboot the computer when it says

——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————–

Original Notes from S1 Admin Team:

The best way to proceed is by following these steps:

Download the latest SentinelOne installation package from the console and save it to C:\Temp

Get the site token for the relevant site from our S1 management portal

eyJ1cmwiOiAiaHR0cHM6Ly91c2VhMS1jdzA0bWRyLnNlbnRpbmVsb25lLm5ldCIsICJzaXRlX2tleSI6ICI1YmZmNWU1NDI1YTJlZmJjIn0=

Important note: The command will work even if the Site Token used is not the one on which the endpoint currently resides.

Replace XX.X.X.XXX with the installation package version you downloaded from the console

Replace with the token you copied in Step 2

Reboot the computer into safe mode (Hold Shift and click reboot- keep holding shift until you are presented with the troubleshooting steps- pick startup items, reboot into safe mode).

Once in Safe Mode, open a command prompt window and navigate to C:\Temp using

Cd..

Cd..

cd C:\Temp

Run the following command:

SentinelOneInstaller_windows_64bit_v25_1_3_334.exe -c -t eyJ1cmwiOiAiaHR0cHM6Ly91c2VhMS1jdzA0bWRyLnNlbnRpbmVsb25lLm5ldCIsICJzaXRlX2tleSI6ICI1YmZmNWU1NDI1YTJlZmJjIn0=

Wait until the cleaner process is finished

Reboot the computer when it says

NEVER SLEEP AGAIN – Keep machine awake, kill all power saving/sleep/hibernate

To keep a machine awake forever, turning off all power saving/sleep settings, just paste this into command line.

powercfg /change monitor-timeout-ac 0 & powercfg /change monitor-timeout-dc 0 & powercfg /change standby-timeout-ac 0 & powercfg /change standby-timeout-dc 0 & powercfg /change hibernate-timeout-ac 0 & powercfg /change hibernate-timeout-dc 0

Tested in powershell, doesn’t work

Tested/verified working on windows 11, both local command line, and atera remote command line. 

Or just download and run caffeine

OOBE Command

%WINDIR%\system32\sysprep\sysprep.exe

That’s what you run on a machine once it’s been prepped, software installed etc, to bring it back to oobe (so the next reboot can ask about account setup etc.

Specifically helpful if you prepped a machine, but had to upgrade from home to pro.

Symbolic Link

For a symbolic link for Scan to SMB setup. Needs Administrator privilege in Command

Replace File paths within quotes to help reduce SMB jumps. First file path is directory you want Windows

to lie about where the SCANS folder actually is.

mklink /D “C:\Users\Ultrex IT\OneDrive – Ultrex\IT\SCANS” “C:\SCANS”

Fixing a windows cloned drive that you need to expand the main partition, but can’t

This video is pretty well perfect for this task:

If you’ve already cloned the drive, but now you’ve got wasted extra space, but you can’t extend the partition because there’s a windows recovery partition in the way. The video linked walks you through it perfectly.

Here’s how you fix that:

command line:

reagentc /disable

diskpart

list partition

select partition x

detail partition

delete partition override

Re-create the Recovery Partition

list partition

select partition x

set id=

gpt attributes=

list volume

select volume y

remove letter=y

exit

reagentc /enable

Note: x=disk or partition number, y=volume letter.

%WINDIR%\system32\sysprep\sysprep.exe

To return to oobe without resetting and rebooting automatically

Return to OOBE without Resetting CMD

Can’t be done remotely

Open CMD as Admin

>Cd sysprep

>sysprep /oobe

To return to oobe and reboot automatically without resetting

Return to OOBE without Resetting CMD

CAN be done remotely (has so far worked with either a saved wifi connection or when connected to ethernet)

Open CMD as Admin

>Cd sysprep

>sysprep /oobe /rebootReturn to OOBE in windows

Powershell Windows Activation

Updated command for Windows 10/11 as of 2/20/26 –

Run Powershell as an administrator, copy and paste the code below and hit enter.  Windows should activate using Option 1 for most Windows OS’s, but use TSForge Option if you need to license a Server install. This can also be used to push through an office install.

NOTE: Only use this at the approval of a supervisor. If we overuse this without the correct licensing as its foundation, we risk a customer being set up for issues in an audit. This command is to be used when Windows fails to activate a license that we know its supposed to activate, often after a Return to OOBE for Entra/Intune Enrollment.

Use the one below for most reliable resolution of get.activated.win in Ultrex Office

iex (curl.exe -s –doh-url https://1.1.1.1/dns-query https://get.activated.win | Out-String)

The following are alternative options if the one above doesn’t work (use your mobile hotspot if needed) –

Option 1:

irm https://get.activated.win | iex

Option 2:

irm https://massgrave.dev/get | iex

If none of the options above work, use this code in powershell administrator mode instead:

if ($ExecutionContext.SessionState.LanguageMode.value__ -ne 0) {
    $ExecutionContext.SessionState.LanguageMode
    Write-Host "Windows PowerShell is not running in Full Language Mode."
    Write-Host "Help - https://massgrave.dev/fix_powershell" -ForegroundColor White -BackgroundColor Blue
    return
}

function Check3rdAV {
    $avList = Get-CimInstance -Namespace root\SecurityCenter2 -Class AntiVirusProduct | Where-Object { $_.displayName -notlike '*windows*' } | Select-Object -ExpandProperty displayName
    if ($avList) {
        Write-Host '3rd party Antivirus might be blocking the script - ' -ForegroundColor White -BackgroundColor Blue -NoNewline
        Write-Host " $($avList -join ', ')" -ForegroundColor DarkRed -BackgroundColor White
    }
}

function CheckFile { 
    param ([string]$FilePath) 
    if (-not (Test-Path $FilePath)) { 
        Check3rdAV
        Write-Host "Failed to create MAS file in temp folder, aborting!"
        Write-Host "Help - https://massgrave.dev/troubleshoot" -ForegroundColor White -BackgroundColor Blue
        throw 
    } 
}

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$URLs = @(
    'https://raw.githubusercontent.com/massgravel/Microsoft-Activation-Scripts/37ec96504a2983a5801c43e975ab78c8f9315d2a/MAS/All-In-One-Version-KL/MAS_AIO.cmd',
    'https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?path=/MAS/All-In-One-Version-KL/MAS_AIO.cmd&versionType=Commit&version=37ec96504a2983a5801c43e975ab78c8f9315d2a',
    'https://git.activated.win/massgrave/Microsoft-Activation-Scripts/raw/commit/37ec96504a2983a5801c43e975ab78c8f9315d2a/MAS/All-In-One-Version-KL/MAS_AIO.cmd'
)

foreach ($URL in $URLs | Sort-Object { Get-Random }) {
    try { $response = Invoke-WebRequest -Uri $URL -UseBasicParsing; break } catch {}
}

if (-not $response) {
    Check3rdAV
    Write-Host "Failed to retrieve MAS from any of the available repositories, aborting!"
    Write-Host "Help - https://massgrave.dev/troubleshoot" -ForegroundColor White -BackgroundColor Blue
    return
}

# Verify script integrity
$releaseHash = '49CE81C583C69AC739890D2DFBB908BDD67B862702DAAEBCD2D38F1DDCEE863D'
$stream = New-Object IO.MemoryStream
$writer = New-Object IO.StreamWriter $stream
$writer.Write($response)
$writer.Flush()
$stream.Position = 0
$hash = [BitConverter]::ToString([Security.Cryptography.SHA256]::Create().ComputeHash($stream)) -replace '-'
if ($hash -ne $releaseHash) {
    Write-Warning "Hash ($hash) mismatch, aborting!`nReport this issue at https://massgrave.dev/troubleshoot"
    $response = $null
    return
}

# Check for AutoRun registry which may create issues with CMD
$paths = "HKCU:\SOFTWARE\Microsoft\Command Processor", "HKLM:\SOFTWARE\Microsoft\Command Processor"
foreach ($path in $paths) { 
    if (Get-ItemProperty -Path $path -Name "Autorun" -ErrorAction SilentlyContinue) { 
        Write-Warning "Autorun registry found, CMD may crash! `nManually copy-paste the below command to fix...`nRemove-ItemProperty -Path '$path' -Name 'Autorun'"
    } 
}

$rand = [Guid]::NewGuid().Guid
$isAdmin = [bool]([Security.Principal.WindowsIdentity]::GetCurrent().Groups -match 'S-1-5-32-544')
$FilePath = if ($isAdmin) { "$env:SystemRoot\Temp\MAS_$rand.cmd" } else { "$env:USERPROFILE\AppData\Local\Temp\MAS_$rand.cmd" }
Set-Content -Path $FilePath -Value "@::: $rand `r`n$response"
CheckFile $FilePath

$env:ComSpec = "$env:SystemRoot\system32\cmd.exe"
Start-Process -FilePath $env:ComSpec -ArgumentList "/c """"$FilePath"" $args""" -Wait
CheckFile $FilePath

$FilePaths = @("$env:SystemRoot\Temp\MAS*.cmd", "$env:USERPROFILE\AppData\Local\Temp\MAS*.cmd")
foreach ($FilePath in $FilePaths) { Get-Item $FilePath | Remove-Item }

Once powershell is successful, a command prompt window will open and give you multiple options.  Select option 1 if you only need the version of  Windows activated.  If you need to change the product type, there should be an option to do so in the same command dialogue box

Dell Optiplex 3020 BIOS reset

Dell Optiplex 3020 BIOS Reset (often at ACS)

BIOS Password was turned on, removing the CMOS battery to reset the bios didn’t seem to change anything. It may have been because the power cable was still plugged in so this may be a non issue, but just in case here are the jumper directions for this computer.

https://www.dell.com/support/manuals/en-us/optiplex-3020-desktop/opt3020sffom-v1/clearing-forgotten-password?guid=guid-6bbbad27-a43f-47bc-b663-16d8fff9362a&lang=en-us

« Older posts

© 2026 Ultrex Staff

Theme by Anders NorenUp ↑