VMware Solutions Discussions

Issues with VSC in Powershell

Hello. We're trying to use CLI commands in Powershell to create a datastore and LUN the same way as we do in the VSC plugin in the vSphere client. Here is the command (specific names have been changed for security): "Add-VscDatastore -storageSystemId 701429001234 -datastoreName DS_testPS -hostName samplehostname -datastoreProtocol VMFS -containerName samplevolume -isThin $true -datastoresize 5 -svm svmname". Here is the output we're receiving:

 

PS C:\Users\Administrator> Add-VscDatastore -storageSystemId 701429001234 -datastoreName DS_testPS -hostName samplehostname -datastoreProtocol VMFS -containerName samplevolume -isThin $true -datastoresize 5 -blockSize 1 - svm svmname Add-VscDatastore : A parameter cannot be found that matches parameter name 'blockSize'. At line:1 char:200 + ... atastoresize 5 -blockSize 1 -svm svmname+ ~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Add-VscDatastore], ParameterBindin gException + FullyQualifiedErrorId : NamedParameterNotFound,VSC.AddDatastore PS C:\Users\Administrator> Add-VscDatastore -storageSystemId 701429001234 -datastoreName DS_testPS -hostName samplehostname datastoreProtocol VMFS -containerName samplevolume -isThin $true -datastoresize 5 -svm svmname Add-VscDatastore : Objectreference not set to an instance of an object. At line:1 char:1 + Add-VscDatastore -storageSystemId 701429001234 -datastoreName DS_testPS -hostNam ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Add-VscDatastore], NullReferenceException + FullyQualifiedErrorId : System.NullReferenceException,VSC.AddDatastore". 

 

Any assistance would be appreciated.

3 REPLIES 3

Re: Issues with VSC in Powershell

Which version of VSC is this?

Re: Issues with VSC in Powershell

The VSC version is 6.2.1P1D5. We've been using the vSphere client plugin version through many versions for several years, but this is the first time we're attempting to use it via command line.

Re: Issues with VSC in Powershell

Please note that we've made some progress and now have a new issue. The discussion is at:

 

https://community.netapp.com/t5/VMware-Solutions-Discussions/Issues-with-VSC-cmdlets-in-Powershell/m-p/140879#M9322

Cloud Volumes ONTAP
Review Banner
All Community Forums
Public