FredBainbridge

Modifying App-V Pass through Filters (reg_sz mult)

In PowerShell v5.0 passthrough filters were implemented that prevent certain registry keys and values to be part of the virtual package. Good article here. One of these is the HKLM\Software\Policies key. This essentially prevents a virtual package from overriding GPO settings. That’s normally awesome, but what if I really wanted some policy settings in my package as opposed to on the workstation itself?

This is possible. Below is an example of how to modify a multi value registry string. #PowerShell

$key = 'HKLM:\software\Microsoft\AppV\Subsystem\VirtualRegistry\'
$PassthroughValuesWithoutPolicies = @() #Empty array
$Property = Get-ItemProperty $key
$Property.PassThroughPaths | ForEach-Object {
    if($PSItem -notin 'HKEY_LOCAL_MACHINE\SOFTWARE\Policies','HKEY_CURRENT_USER\SOFTWARE\Policies')
    {
        $PassthroughValuesWithoutPolicies += $PSItem
    }
}
Set-ItemProperty $key PassThroughPaths -Value $PassthroughValuesWithoutPolicies

This will remove the filters for the HKLM\Software\Policies and HKCU\Software\Policies section and nothing else.

You can either make this a script that is called using the deployment xml files or deploy it as a CI with ConfigMgr, or in a plethora of other ways.


Share