How to Find GPO Software Installation Folders

Data gpo software

When moving data to a new file structure, e.g., when implementing DFS, you need to update all references.

Data references are typically found in GPOs with settings for drive mapping and Software Distribution.

Many other references may exist, such as Excel sheet references, generic script references, etc.

For now, we’ll be focusing on GPOs with software distribution

Check our other articles to document more areas of your GPOs:

For detailed instructions on how you can create your own GPO analysis scripts, read this.

Using PowerShell to Identify GPO Software Distribution

It may be challenging to find all policies that reference the data you’re moving in an old domain with a long history.

To ensure you don’t miss anything, it makes good sense to fire up PowerShell.

Use the following script to identify all software distribution GPOs in your domain:

Function Get-AppSettings ($ExtData, $Gpo, $Scope){
  $ArrResult = @()
  ForEach ($ExtensionData In $ExtData) {
    If ($ExtensionData.Name -eq "Software Installation") {
      $Apps = $ExtensionData.Extension.msiApplication
      ForEach ($App In $Apps) {
          $AppInstaller = New-Object PSObject -Property @{
          GPO = $GPO.Name
          LinkCount = $LinkCount
          Enabled = $Enabled
          Name = $
          Path = $App.Path
          Scope = $Scope
          Type = $App.DeploymentType
          OutOfScope = $App.LossOfScopeAction
        $ArrResult += $AppInstaller
  Write-Output $ArrResult

$Reports = Get-GPO -All | Get-GPOReport -ReportType Xml
$AppInstallers = @()
ForEach ($Report In $Reports) {
  $GPO = ([xml]$Report).GPO
  $LinkCount = ([string[]]([xml]$Report).GPO.LinksTo).Count
  $Enabled = $GPO.Computer.Enabled
  $ExtData = $GPO.Computer.ExtensionData
  $AppInstallers += Get-AppSettings $ExtData $GPO "Computer"
  $Enabled = $GPO.User.Enabled
  $ExtData = $GPO.User.ExtensionData
  $AppInstallers += Get-AppSettings $ExtData $GPO "User"
Write-Output $AppInstallers | ft GPO,LinkCount,Enabled,Name,Path,Type,OutOfScope

The output from the script will look similar to this:

GPO           LinkCount Enabled Name            Path                                         Type   OutOfScope
---           --------- ------- ----            ----                                         ----   ----------
AccountingApp         1 true    Acc Application \\fileserver-1\Software\AcctClient.msi       Assign Unmanage
CRM-client            2 true    CRM Software    \\fileserver-2\Software\CRM\crm_v4.5.msi     Assign Unmanage
AV Agent              1 false   Antivirus Agent \\fileserver-1\Software\Symantec\ep_v7.8.msi Assign Unmanage

Once the GPOs are identified, review which ones reference the data you’re moving.

Update the Installation Path of Published Applications

You can change the installation path by editing the associated packageRegistration key in AD. You can find it using the following DN:

CN={some guid},CN=Packages,CN=Class Store,CN=User,CN={GPO Guid},CN=Policies,CN=System,DC=domain-name,DC=domain-extension

Have a look at this article for a more detailed explanation on how to change the installation path of your published applications.