I am trying to run vCloudDirector powerCli via rsh.
I ran vSphere powerCli with the following options successfully. But when I try to connect to the vCD, it could not recognize the vCD commands.
I am wondering if any one has figured out how to run vCloudDirector powerCli via rsh.
rsh <host> "powershell.exe -psc \"C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1\" -c \"Connect-VIServer -Server $server -User $user -Password $passwd; New-VApp -Name $NEW_VAPP -Datastore $DS -Location $DRS -VApp $TEMPLATE\""
-----------------------------------------------------------------------------------------------------------------------------------
Connect-CIServer : The term 'Connect-CIServer' is not recognized as the name
of a cmdlet, function, script file, or operable program. Check the spelling of
the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Connect-CIServer:String) [], Co
mmandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException