VMtools update problems for several virtual machines

I know this is an old post, but I seem to have trouble. I am very new to powershell, so forgive me.

My code is almost the same, less obvious. I throw a terminator of a few mistakes. What Miss me?

Get-Content-C:\VM\VMs.txt | '

ForEach-Object {update-tools - VM $_}

In my VM text document, I have a servername and that's all.

Error message received: the start of the string:

To the C:\VM\test.ps1:1 of the 30 + Get - Content char-C:\VM\VMs.txt |  < < < < '

the terminator is missing: '.

C:\VM\text.ps1:2 tank: 48

+ ForEach-Object [{update-tools - VM $_} < < < <]

+ CategoryInfo: ParserError:)

For each goals... ({M $_}: String) [], ParseException exception

+ Fully QualifiedErrorId: TerminatorExpectedAtEndOfString any help would be great, thanks!

The last character of the first line must be the tick back 'instead of the apostrophe'.

The sign less in front of the path should not be there.

Get-Content C:\VM\VMs.txt | `

ForEach-Object {update-tools - VM $_}

Best regards, Robert

Post edited by: RvdNieuwendijk

Tags: VMware

Similar Questions

  • RDM for several virtual machines on the same LUN

    Hi, I have a requirement for multiple virtual machines to have access to the same LUN filestore. I think create ROW for each virtual computer to the LUN. I wanted to ask if this is possible and if someone put in place before?

    Are there issues making this record to file/san locks?

    Thank you

    Once you add the raw device map to a virtual computer, you can not add it to each other as well.

    It would satisfy your requirement to add to a virtual computer, assign it a drive name or folder, then that spread out and have another card SMV a drive to it?  Depending on what you're trying to do, which can satisfy because it will work.

    Rich

  • How to extend vmdk for several virtual machines?

    Hello!

    I have a 300 + vm on vsphere5.1 and I need to extend the system drive on each of them. Have ideas of how do with powercli? Thank you.

    You can try something like that.

    It will increase the size of 20% vmdk. Note that the virtual computer must be turned off for this.

    Get-VM | Where {$_.PowerState -eq "PoweredOff"} |Get-HardDisk -Name "Hard disk 1" |Set-HardDisk -CapacityGB ([int]($_.CapacityGB * 0.2)) -Confirm:$false -HelperVM $vm
    

    You can find another example in need a script powercli to increase Harddisk1 of virtual machines in a 20 GB file, can anyone give a script.

  • Printer for several virtual machines?

    I have some difficulty right now to find how to print from virtual machines. I have a printer connected to the computer and it can connect to a virtual machine to print, but it can be connected to 1 VM at a time. Is it possible to make sure that all 4 virtual machines can have the ability to print at the same time?

    Navigation on NAT tends not to work.  So yes, try jumpered.  Your operating system should be on the same workgroup or domain.  (Not absolutely necessary, but more difficult if they are not the same).

  • Upgrade VMware Tools for multiple virtual machines by power Cli

    Hello

    I'm looking to improve the tools of vmware for several virtual machines through scripts. As VM1, VM2, Vm3,... VM50.

    Update-tools-VM VM1 - NoReboot  (Applicable only for virtual machines unique sound)

    Any help will be appreciated in do I have to upgrade about 100 VMs which was migrated from ESX3.5 to ESXi4.1

    Thank you

    VMguys

    The cmdlet Update-tools has a NoReboot parameter.

    When you set this switch, normally should not be a reboot after the upgrade.

    Get-VM-name (1.50 | % {' VM$ _ "}) | Update-tools - NoReboot

    If you set the switch to $false, there will be a restart if necessary.

    Get-VM-name (1.50 | % {' VM$ _ "}) | Update-tools - NoReboot: $false

    Note that this method of first creating a table with all the names of the virtual machine you want, is faster than the previous example, I gave.

    In this case you only do a Get - VM with all the names, instead of 50 individual.

  • List of data store, SpaceProvisioned, Spaceused for multiple virtual machines

    Hello

    I want to list the data store, the SpaceProvisioned, the Spaceused for several virtual machines.

    I wrote the following lines, but this didn t work:

    $vms = get - VM v998spwmv10175n
    {foreach ($vm to $vms)
    $vmname = $vm. Name
    $vmdiskprovisioned = $vm. ProvisionedSpaceGB
    $vmdiskused = $vm. UsedSpaceGB
    $vmdiskpath = get-disk hard - VM $vm | Select file name
    Select @{N = "VMname"; E = {$vmname}},
    @{N = "VMDiskPath"; E = {$vmdiskpath}},
    @{N = "VMDiskProvisioned"; E = {$vmdiskprovisioned}},
    @{N = "VMDiskUsed"; E = {$vmdiskused}} | Format-Table

    }

    What wrong with it? I'm away right?

    THX in advance

    Chakoe

    The following script lists each vDisk in a separate line. The VMDiskProvisioned and VMDiskUsed properties are always those of the virtual machine.

    $vms = Get-VM v998spwmv10175n
    & {foreach ( $vm in $vms ) {
      $vmname = $vm.Name
      $vmdiskprovisioned = $vm.ProvisionedSpaceGB
      $vmdiskused = $vm.UsedSpaceGB
      foreach ($HardDisk in (Get-Harddisk -VM $vm)) {
        $HardDisk | Select-Object -Property @{N="VMname"; E={$vmname }},
              @{N="VMDiskPath"; E={$HardDisk.FileName}},
              @{N="VMDiskProvisioned"; E={$vmdiskprovisioned }},
              @{N="VMDiskUsed"; E={$vmdiskused  }}
      }
    }}
    
  • Need help updated the VMX file on several Virtual Machine

    All,

    Can anyone help with a problem I'm having?  Here is a brief explanation of what is happening and what we need to solve.

    Recently we found out that we need to add a line in the file VMX of several virtual machines.  In the past, I was able to do this, but would have cold start the virtual machine for the changes to take effect.  Starts cold won't be a problem, because we can program it.

    However, no one knows a way to add this line in the file VMX virtual machines in a cluster.

    Here's the line I need added:

    Devices.hotplug = "false".

    Here is a script that was used earlier (esx 3.0 days) to keep the VM tools updated on reboot.  At this point, if the virtual machine has been turned on, this change could not do through the UI.  However, this script worked to update the .vmx file and then we have cold reboots for the changes to take effect.

    Get-viserver - < Server > - < user > - < password >

    $viview = get-Cluster-name NOMCLUSTER | Get - VM | foreach-object {get-view ($_.ID)}
    $viview | {foreach-object
    $vmConfigSpec = new-Object VMware.Vim.VirtualMachineConfigSpec
    $vmConfigSpec.Tools = new-Object VMware.Vim.ToolsConfigInfo
    $vmConfigSpec.Tools.afterPowerOn = 'True '.
    $vmConfigSpec.Tools.afterResume = 'True '.
    $vmConfigSpec.Tools.beforeGuestStandby = 'True '.
    $vmConfigSpec.Tools.beforeGuestShutdown = 'True '.
    $vmConfigSpec.Tools.ToolsUpgradePolicy = "UpgradeAtPowerCycle".
    $_. ReconfigVM ($vmConfigSpec)
    }

    The exact script can be found in Disable HotPlug

  • Management update for the Virtual Machine update

    Dear people,

    I have an obligation to use the Update Manager to update java and adobe software windows VM insde. But I can find no basis for Virtual Machine updates or software updates. Reference predefined VM have only VMtools updates and VMHardware.

    Could someone help me please?

    Update: we have using maager update 5.

    --

    Thank you

    Hari.

    Manager Update are no longer updated software inside the virtual machine to be

    Maish

    VMTN moderator | vExpert

    Author of VMware vSphere Design

    @maishsk | My Blog

  • Is it possible under the EULA to have several virtual machines on a single physical hard disk while using the same OS license or do I need a separate license for each virtual computer?

    I have several programs that are not compatible with my 64 bit Windows 7 operating system.  I would like to run each different software under another virtual machine of VMWare (5 packs of different software programs and 5 different virtual machines of Windows XP).  These would all be installed on your laptop.  I can use the same license of Windows XP for each virtual machine, or do I need a separate XP license for each (different XP in case 5 licenses)?

    It is lifted directly from my EULA:

    1. GRANT OF LICENSE.
    The manufacturer that you grant the following rights, provided that
    comply you with all terms and conditions of this EULA:
    1.1 installation and use.  You may install, use, access,
    display and run one copy of the SOFTWARE on
    THE COMPUTER.  The SOFTWARE may not be used
    by more than two 2-processor both on the
    COMPUTER, unless a greater number is
    indicated on the certificate of authenticity.
    Then...
    This means that as long as you are running two or more instances of XP at the same TIME, you agree? Or does this mean that, after you install once, you have reached your limit?
    I imagine that most people (including those who are running Microsoft!) will say that the second interpretation is correct.
    However...
    If this is the case, anyone their hard drive as a backup to clone strategy would violate the EULA!
  • VMTools fails to run for the virtual machine Windows 2000

    My first post.

    Just installed VMWare Workstation 8.0 on a Windows 7 64 bit computer and I'm trying to create a virtual machine to Windows 2000 Professional from a CD of Installation. I'm trying to resurrect an old machine from the grave of cyber.

    I created a disk image ISO of the installation CD Windows 2000 Pro original and then used the new computer Virtual Assistant to create a new virtual machine from it. Everything was fine, the new virtual machine started using the video driver by default since the installation media. Therefore I could not make any changes to the screen. VM Workstation suggested I have install VMTools.

    But when I installed VMTools, installation fails just before she completed displays a dialog box stating "Setup failed to upgrade Windows Installer.

    So I have reproduced the same process on a copy of VMWorkstaion 6.5.2 running on a Windows XP-based computer by using a copy of the same ISO image. I installed VMTools and completed the installation successfully. Then I cloned the machine and copied to the first machine. The new virtual machine booted up and I was able to make changes to the screen. However, VMWorkstation 8.0 informed the VMTools was outdated and run it again. When I did, it has exactly the same way as it did before.

    Although the new virtual machine created the 6.5.2 VMWorkstation works better, I prefer to have a recent version of VMTools install correctly on this virtual machine.

    Does anyone have any ideas or solutions?

    I think Win2000 needs to be patched to Service Pack 4 to the latest version of VMware and the VMware tools.

  • Several virtual machines attached to port VM group

    Hi all

    So I did research on the internet and on this forum and I have not found a good answer to my question. So I would check that I can create a unique Virtual Machine port group and attach multiple virtual machines and run them simultaneously. I basically want to have each VM attached to this switch, but instead to a separate port group, it seems that I can just attach to the same port group that puts on the vSwitch.

    Is there problems of L2 with MAC address or ARPing or something like that? I realize that I have to ensure that each VM has correctly configured the IP settings. I know there are problems, but I am wanting clarification of the people who have done this before. Are there problems of interface as with a real switch speed or who is not serious in a vSwitch?

    Thank you!

    -GNS

    You can attach multiple virtual machines to the same group of port without problems, this is how normally environment are created. Have a look here for more details: vSphere Standard switches

    The image below shows several virtual machines connected to the same port group:

  • Setting Options such as Hotplug for all virtual machines

    Hello!

    I have about 5 esxi hosts 5 and about 50 virtual machines

    Unfortunately I forgot to select some options like activate the plug-in memory and cpu hot

    I have 2 questions

    1 can I do this without turning off the machine

    2. How do I make a few options like this (or for example another option as vmtools update during the feeding cycle) for all virtual machines in my environment

    It's too much time to go to all virtual machines and turn them off and turn on these options

    Thank you very much

    These features must be enabled before the virtual machine is running.  So, you will need to turn them off and then use something like powercli to enable the features and turn them back on.

    Here is an example on how to do it with powercli: http://ict-freak.nl/2009/10/05/powercli-enabledisable-the-vm-hot-add-features/

    -KjB

  • iSCSI without Jumbo frames for 15 Virtual Machines

    I have a physical to VME to be implemented which took the material for the SAN already purchased and resources research I see I have a HP MSA2324i table, two HP DL 380 G6 servers with two HP 2512 switches, but I found that this switch does not support jumbo frames.

    This means that I'll have to stick to the default 1 500 bytes for Ethernet iSCSI frames and I worry, how this may affect the performance of storage network.  I have migrated 15 servers, and of them, I have both SQL Server 2005 and a role of mailbox Exchange 2010 for 100 users.

    My thought is that I have a load of really light work that the SQL Server, databases don't support every 20 users and I should be able to keep these virtual machines running efficiently without the use of frames.

    Are there experiences of the V sphere 4.1 functioning when using standard Ethernet iSCSI?

    See you soon

    Kyle

    I don't have not upgraded to 4.1 yet, but we ran standard ethernet iSCSI on 3.5 for several different machines and never encountered any problems.    VSphere is out with enabled frames, but I did not notice a huge difference.   I think you'll be fine, but you should definilty keep an eye on things.

    Here's a nice blog on putting in place of iSCSI for vSphere environments, http://virtualgeek.typepad.com/virtual_geek/2009/09/a-multivendor-post-on-using-iscsi-with-vmware-vsphere.html

    If you have found this device or any other useful post please consider the use of buttons useful/correct to award points

  • rename several virtual machines based on the State of food &amp; VM name

    I'm looking for a powershell script to rename the virtual machine based on the state name and vm power.  For example, I have several virtual machines with a - temp at the end of the name of the server.  Some are turned on and some are turned off.  I am wanting to rename only those who is off

    Thank you

    tjw82

    Assuming that - temp is part of the name

    Get - vm | where {$_.powerstate - eq "poweredoff"} | foreach {Set-machine virtual - VM $_ - name (($_.name).)} Replace ("temp", "delete"))}

  • A suspended snapshot could not be created for the virtual machine (DC) ha-data center (DC) \vm\VMware vCenter Server Appliance.

    Hello gentlemen,

    I can not only save this virtual machine with Backup Exec 2014 for a long time.

    They are there was no snapshot in snapshot Manager.

    Could you help me?

    A suspended snapshot could not be created for the virtual machine (DC) ha-data center (DC) \vm\VMware vCenter Server Appliance.

    V-79-57344-38260 - failed to create a snapshot of the virtual machine. The virtual machine is no longer exist, or may be too busy to pause to take the snap.

    A suspended snapshot could not be created for the virtual machine (DC) ha-data center (DC) \vm\FRPA111PRIM01.

    V-79-57344-38299-\vm\FRPA111PRIM01 ha-data center (DC) VMVCB::\\192.168.204.42\VCGuestVm\ (DC). To try to take a snapshot of a virtual machine failed because it could not be suspended in a file system.

    Hello

    I found the solution.

    I disabled the JOB BE general relativity.

    and the host where the virtual machine belong was not the right time. No Ntp server has been configured.

    I did and now there works.

    I think that the problem can come from this.

Maybe you are looking for