PowerShell: Append to Registry

Overview

In this scenario, I needed to enable an additional feature for a program that is configured via the registry, while preserving the features that were already in place. Since not all devices had the same features enabled, I needed to append the new feature to the existing configuration. The PowerShell example provided below demonstrates this process for the iManage program.

PowerShell Code
$regvalue1 = (Get-ItemProperty "HKLM:\SOFTWARE\WOW6432Node\Interwoven\WorkSite\Client\FileSite\Commands\MyMatters").Commands
Set-ItemProperty "HKLM:\SOFTWARE\WOW6432Node\Interwoven\WorkSite\Client\FileSite\Commands\MyMatters" -Name Commands-Value "$regvalue1,-,iManExt.PurgeCmd"
$regvalue2 = (Get-ItemProperty "HKLM:\SOFTWARE\WOW6432Node\Interwoven\WorkSite\Client\FileSite\Commands\SearchFolder").Commands

Set-ItemProperty "HKLM:\SOFTWARE\WOW6432Node\Interwoven\WorkSite\Client\FileSite\Commands\SearchFolder" -Name Commands-Value "$regvalue2,-,iManExt.PurgeCmd" 

Post a Comment

0 Comments