You must provide a value expression on the right-hand side of the '-' operator.
At C:\webcommander\powershell\objects.ps1:198 char:18
+ if ($psVer[0] - <<<< in ("2", "3", "4")) {
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : ExpectedValueExpression
The term 'newServer' is not recognized as the name of a cmdlet, function, scrip
t file, or operable program. Check the spelling of the name, or if a path was i
ncluded, verify that the path is correct and try again.
At C:\webcommander\powershell\listDatastore.ps1:39 char:20
+ $server = newServer <<<< $serverAddress $serverUser $serverPassword
+ CategoryInfo : ObjectNotFound: (newServer:String) [], CommandNo
tFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Get-Datastore : 10/29/2013 6:15:41 PM Get-Datastore You are not curre
ntly connected to any servers. Please connect first using a Connect cmdlet.
At C:\webcommander\powershell\listDatastore.ps1:40 char:27
+ $datastore = get-datastore <<<< -Server $server.viserver
+ CategoryInfo : ResourceUnavailable: (:) [Get-Datastore], ViServ
erConnectionException
+ FullyQualifiedErrorId : Core_BaseCmdlet_NotConnectedError,VMware.VimAuto
mation.ViCore.Cmdlets.Commands.GetDatastore
44886.9 seconds