- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I've found this on a post on communities to automate vmware tools upgrade / install:
$installerArgs = 'REBOOT="ReallySuppress"'
Get-VM | % { (Get-View $_).UpgradeTools_Task($installerArgs) }
Variable initialisation happens witout any Pb, but when I copy the second line (with a VM name following Get-VM of course) it give me this :
C:\> Get-VM GQN00549 | % { (Get-View $_).UpgradeTools_Task($i
nstallerArgs) }
Get-View : 27/05/2010 15:59:19 Get-View Invalid object specified for
parameter Id - 'VirtualMachineImpl'. Valid types are ManagedObjectReference and
string.
At line:1 char:32
+ Get-VM GQN00549 | % { (Get-View <<<< $_).UpgradeTools_Task($installerArgs) }
+ CategoryInfo : InvalidArgument: (GQN00549:VirtualMachineImpl) [
Get-View], VimException
+ FullyQualifiedErrorId : Core_GetVIView_TryGetIdParam_InvalidValue,VMware
.VimAutomation.Commands.DotNetInterop.GetVIView
You cannot call a method on a null-valued expression.
At line:1 char:54
+ Get-VM GQN00549 | % { (Get-View $_).UpgradeTools_Task <<<< ($installerArgs) }
+ CategoryInfo : InvalidOperation: (UpgradeTools_Task:String) [],
RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
I'm a newbie on powerCLI so is someone can debug this for me please ?
Thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try:
$installerArgs = 'REBOOT="ReallySuppress"' (Get-VM | Get-View).UpgradeTools_Task($installerArgs)
Regards Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to Install Instead Upgrading ?
After Upgrade, my vmware tools are still "out of date" are the needed a reboot ?
Thx very much
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tested a reboot on a VM after launching these command lines.
Nothing more happens, my vmwaretools are still out of date.
Is someone know what to do to achieve correctly the installation and finaly obtain this "OK".
Thx