Jump to content


PVS 7.x Powershell unable to add-pvsdiskversion

Started by James Scanlon , 02 February 2017 - 02:00 PM
1 reply to this topic

James Scanlon Members

James Scanlon
  • 10 posts

Posted 02 February 2017 - 02:00 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 : Freddy.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
So then I exported the XML File for the vDisk and repeat the above command (or run the below command) I keep getting the same result 'Object not found: PVS Exception
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?

Any feedback or assistance much appreciated


Harish A Citrix Employees

Harish A
  • 19 posts

Posted 03 February 2017 - 05:43 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"