VMware Solutions Discussions

Issues with VSC in Powershell

PeteK001
3,174 Views

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

satishv
3,094 Views

Which version of VSC is this?

PeteK001
3,076 Views

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.

PeteK001
3,025 Views

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

Public