Jump to content


PVS 7.x Powershell unable to add-pvsdiskversion

Started by James Scanlon , 02 February 2017 - 01:54 PM
2 replies to this topic

James Scanlon Members

James Scanlon
  • 10 posts

Posted 02 February 2017 - 01:54 PM

Hi All

Following these guides






I have been trying to automate a vDisk version creation with powershell for PVS.


Regardless of where I run the powershell command (locally or on the server) or whether I use PVS Version 7.6 or 7.9 the command doesnt work.




PS C:\users\user> get-pvsdisklocator -guid b794b123-9dd0-4cc3-be95-3de4000b3ea5 | add-pvsdiskversion
add-pvsdiskversion : XA65_EUS_v4USBuild.xml: vDisk file was not found.
At line:1 char:65
+ get-pvsdisklocator -guid b794b123-9dd0-4cc3-be95-3de4000b3ea5 | add-pvsdiskversi ...
+                                                                 ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Citrix.PVS.Snap...VersionSet : 0
:PvsDiskLocator) [Add-PvsDiskVersion], PvsException
    + FullyQualifiedErrorId : Citrix.PVS.SnapIn.VDiskFileNotFound,Citrix.PVS.SnapIn.AddPvsDiskVersion
PS H:\> add-pvsdiskversion -name "Freddy" -sitename "London" -StoreName "Freddy"
add-pvsdiskversion : No object was added, updated, or deleted in the last operation.
At line:1 char:1
+ add-pvsdiskversion -name "Freddy" -sitename "London ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (System.Collecti...ystem.String][]:KeyValuePair`2[]) [Add-PvsDiskVersion], PvsException
    + FullyQualifiedErrorId : Citrix.PVS.SnapIn.ZeroObjectsAffected,Citrix.PVS.SnapIn.AddPvsDiskVersion



Any advice?

Harish A Citrix Employees

Harish A
  • 19 posts

Posted 03 February 2017 - 05:44 PM

Hello James,
To use the snapin, you have to first register it (requires .Net framework). If your Windows is 32bits, use this command:
“C:\Windows\Microsoft.NET\Framework\v2.0.50727\installutil.exe” “C:\Program Files\Citrix\Provisioning Services Console\McliPSSnapIn.dll”
For 64bits:
“C:\Windows\Microsoft.NET\Framework64\v2.0.50727\installutil.exe” “C:\Program Files\Citrix\Provisioning Services Console\McliPSSnapIn.dll”
If you encountered error, make sure that you are running the Command Prompt as administrator.
Once registered, start a PowerShell console and add the snapin using “add-PSSnapIn mclipssnapin"

Then you can use below command to add vDisk version


add-pvsdiskversion -name "Freddy" -sitename "London" -StoreName "Freddy"

Carl Fallis Citrix Employees

Carl Fallis
  • 984 posts

Posted 07 February 2017 - 12:18 PM

What are you trying to do James, are you trying to add a version to the store?  This call adds an already created version of a vdisk to the database, so you must have an xml file that was created by exporting the disk chain, then copy the vdisk version(s) and add the version using the add using the add-pvsdiskverison call.


To create a vdisk version use New-PvsDiskMaintenanceVersion -disklocatorname vdiisk1 -sitename site1 -storename store1  this created a new maintenance version for vdisk vdisk1


For registration use %systemroot%\Microsoft.NET\Framework64\v4.0.30319\installutil.exe  Citrix.PVS.Snapin.dll 


the mclipssnapin is the older powershell commands that will still work but moving forward you should use the latest version that is a true powershell interface.