<< Back to Script Library

Reset WEM – Registry Settings

Reset registry key where WEM registry settings are stored.

Version: 1.2.25
Created: 2017-07-11
Modified: 2019-05-20
Creator: timriegler
Downloads: 27
Tags: Citrix WEM
The Script Try this script with ControlUp Copy Script Copied to clipboard
<# 
.SYNOPSIS
    Remove ControlUp Registry settings in the cache in the logged on user's registry
.DESCRIPTION
    The registry cache occassionally becomes corrupted. This SBA will remove the WEM cache for only
    the registry settings. A WEM refresh on the agent / VDA is required to complete the refresh. You
    may also log the user off / back on again.
.PARAMETER RegPath
    Path to the registry cache
.NOTES
    Created by Tim Riegler
#>

$RegPath = 'HKCU:SoftwareVirtuAll SolutionsVirtuAll User Environment ManagerAgentTasks Exec CacheRegistryValues*'

# Check if the item exists and delete all sub-keys.
Try {
    If (Test-Path (get-childitem $RegPath)) {
        Write-Host "Key Exists! Deleting exisitng key..."
        # Remove-Item -Path HKCU:CurrentVersion* -Recurse
        Remove-Item -Path $RegPath -Recurse
    } 
}
Catch {
    Throw "Key does NOT exist. Exiting."
    Exit 1
}


Write-Host 'Registry Key reset. Please use WEM Admin Console to refresh the workspace agent on this host:' $env:computername
START YOUR TRIAL

Get Your Download Link

Gain access to ControlUp from your PC. Register and get a link to start your Free Trial.