After upgrading Windows on a PVS server, PowerShell snapins are no longer shown

After upgrading Windows on a PVS server, PowerShell snapins are no longer shown

book

Article ID: CTX235079

calendar_today

Updated On:

Description

After upgrading a PVS server from Windows Server 2008 R2 to Windows Server 2019, it was observed that none of the PVS PowerShell snapins were registered.  Tools (like the App Layering Agent) that attempted to use those those PowerShell cmdlets failed, though they had worked before the upgrade.

Resolution

You need to re-register those PowerShell snap-ins. Reregistering Citrix.PVS.Snapin.dll is well-known, but there are 5 other snap-ins that are necessary as well.
  • Citrix.PVS.Snapin
  • Citrix.Broker.Admin.V2
  • Citrix.Configuration.Admin.V2
  • Citric.ConfigurationLogging.Admin.V1
  • Ctrix.DelegatedAdmin.Admin.V1
  • Citrix.Host.Admin.V2
On the PVS server, run CMD as Administrator. Then in each of these folders:
CD \Windows\Microsoft.NET\Framework64\v4.0.30319

CD \Windows\Microsoft.NET\Framework\v4.0.30319
Run all of these commands:
.\InstallUtil.exe "C:\Program Files\Citrix\Provisioning Services Console\Citrix.PVS.Snapin.dll"

.\InstallUtil.exe "C:\Program Files\Citrix\Broker\Snapin\v2\BrokerSnapin.dll"

.\InstallUtil.exe "C:\Program Files\Citrix\Configuration\SnapIn\Citrix.Configuration.Admin.V2\Citrix.Configuration.PowerShellSnapIn.dll"

.\InstallUtil.exe "C:\Program Files\Citrix\ConfigurationLogging\SnapIn\Citrix.ConfigurationLogging.Admin.V1\Citrix.ConfigurationLogging.PowerShellSnapIn.dll"

.\InstallUtil.exe "C:\Program Files\Citrix\DelegatedAdmin\SnapIn\Citrix.DelegatedAdmin.Admin.V1\\Citrix.DelegatedAdmin.PowerShellSnapIn.dll"

.\InstallUtil.exe "C:\Program Files\Citrix\Host\SnapIn\Citrix.Host.Admin.V2\\Citrix.Host.PowerShellSnapIn.dll"
No reboot is necessary.  It's possible that all but the first two (Citrix.PVS.Snapin and BrokerSnapin) will error out. 
However, the App Layering Agent (which uses these) only seems to require the Broker and the PVS snap-ins.