Studio Fails to load with Error - Cannot load Windows PowerShell snap-in Citrix.Storefront.Admin.V1

Studio Fails to load with Error - Cannot load Windows PowerShell snap-in Citrix.Storefront.Admin.V1

book

Article ID: CTX322438

calendar_today

Updated On:

Description

The following error is seen when launching the studio.

Cannot load Windows PowerShell snap-in Citrix.Storefront.Admin.V1 because of the following error: Could not load the file or assembly Citrix.Storefront.PowerShellSnapin.dll' or one of its dependencies. the system cannot find the path specified.

Error details:
Error Id: XDDS:69ED41AF

Exception:
Error Source : Citrix Studio
StackTrace: System.Management.Automation.Runspaces.PSSnapInException Cannot load Windows PowerShell snap-in Citrix.Storefront.Admin.V1 because of the following error: Could not load file or assembly 'Citrix.Storefront.PowerShellSnapIn.dll' or one of its dependencies. The system cannot find the path specified.

at System.Management.Automation.Runspaces.PSSnapInHelpers.LoadPSSnapInAssembly(PSSnapInInfo psSnapInInfo, Dictionary`2& cmdlets, Dictionary`2& providers)
at System.Management.Automation.Runspaces.InitialSessionState.ImportPSSnapIn(PSSnapInInfo psSnapInInfo, PSSnapInException& warning)
at System.Management.Automation.Runspaces.InitialSessionState.ImportPSSnapIn(String name, PSSnapInException& warning)
at Citrix.Console.CmdletExecution.PowerShellConfiguration.ImportPSSnapIn(String name, Exception& warning)
at Citrix.Orchestration.Base.PowerShellSdk.InitializePowerShellEnvironmentScript.CreateRunspaceConfiguration()
at Citrix.Orchestration.Base.PowerShellSdk.InitializePowerShellEnvironmentScript.Run()
at Citrix.Orchestration.Base.PowerShellSdk.InfrastructureService.Initialize(IList`1 components, String controllerAddress, Configuration appConfig, Boolean allowBlockingDispatcherThread)
at Citrix.Orchestration.Base.PowerShellSdk.PowerShellService.Initialize(IEnumerable`1 components, Configuration appConfig, Boolean allowBlockingDispatcherThread)
at Citrix.Console.MmcSnapin.SnapInClass.InitializePowerShell(Configuration appConfig)
at Citrix.Console.MmcSnapin.SnapInClass.<OnInitializeSnapIn>b__9_0()

image.png

Citrix Storefront Service is not running. It fails to start with the following error as seen in the screenshot below.

image.png

In event logs we could see below errors,

Image_2021-07-15_17-49-01.png
Image_2021-07-15_17-49-14.png

Resolution

 As per the studio error, the PowerShell Snap-in Citrix.Storefront.Admin.V1 and the dll file 'Citrix.Storefront.PowerShellSnapIn.dll' is missing.

Please take the following steps to repair the snap in and the service. 

  • Mount the ISO for CVAD product installation.
  • Go to Citrix Desktop and Delivery Controller folder
  • Right click on each MSI files highlighted in the screenshot below, select install and then select repair.

Image_2021-07-15_17-54-08.png

 

  • Once repaired we should be able to launch the studio.
  • However, the Storefront service  may still not start, as it could fail with below errors

Image_2021-07-15_17-55-36.png

  • Errors in the Event log shows that there was a problem accessing the configuration file for the services.

Image_2021-07-15_17-55-22.png

 

  • To fix this, please copy the config file from one of working controller.
  • Add it under folder C:\Program Files\Citrix\Storefront\Service\
  • Once the configuration files are added start the service.

Problem Cause

Missing snap-in or corrupt dll

PowerShell snap-in -  Citrix.Storefront.AdminV1
Dll - Citrix.Storefront.PowerShellSnapIn.dll
Missing config file - citrix.Storefrotn.exe.config under folder 
C:\Program Files\Citrix\Storefront\Service\