Quantcast
Channel: VMware Communities : All Content - VMware vCenter™
Viewing all articles
Browse latest Browse all 24426

Error in script execution PowerCLI change IOPS

$
0
0

Community'm wanting to run the script below, however when run got the following error in the output.

 

Please could you help me?

 

######## SCRIPT ##########

$hostesxi = Get-Content -Path "C:\Users\vsilva\Desktop\hostsinfo.csv"

$DiskID = Get-Content -Path "C:\Users\vsilva\Desktop\diskiops.csv"

 

 

Connect-VIServer -Server $hostesxi -User "myuser" -Password "mypassword"

 

 

 

### $esxcli.system.hostname.get() ###

 

 

$esxcli = Get-EsxCli -VMHost $hostesxi

$esxcli.storage.nmp.device.list() | where {$_.Device -match $DiskID}| % $esxcli.storage.nmp.psp.roundrobin.deviceconfig.set(0,$null,$_.Device,1,"iops",0)

 

------------------------------------------------------------------------------------------------------

######BUG OUT#######

 

Cannot find an overload for "set" and the argument count: "6".

At C:\Users\vsilva\Desktop\changeiops.ps1:9 char:1

+ $esxcli.storage.nmp.device.list() | where {$_.Device -match $DiskID}| % $esxcli. ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [], MethodException

    + FullyQualifiedErrorId : MethodCountCouldNotFindBest


Viewing all articles
Browse latest Browse all 24426

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>