CBT correct using CLI error

"You can not call a method on a null value expression.

I am trying to script of runa who will fix a CBT problem we have with Net-backup and restore snapshots.  This is the script:

$choice = Read-Host "Press 1 to select a virtual machine or press 2 to select a group."

switch ($choice)
{
{1}
$vmName = Read-Host "Please enter a name of virtual machine to reset the CBT on.»

$vmInfo = get - vm $vmName
$spec = new-Object VMware.Vim.VirtualMachineConfigSpec
$spec. ChangeTrackingEnabled = $false


$vmInfo.ExtensionData.ReconfigVM ($spec)
$snap = $vmInfo | New-Snapshot - name 'Disable CBT'
$snap | Remove-Snapshot - confirm: $false
}
{2}
$vmName = Read-Host "Please enter a Cluster name to reset the CBT on.»

$vmInfo = get-Cluster $vmName | Get - VM
$spec = new-Object VMware.Vim.VirtualMachineConfigSpec
$spec. ChangeTrackingEnabled = $false

$vmInfo.ExtensionData.ReconfigVM ($spec)
$snap = $vmInfo | New-Snapshot - name 'Disable CBT'
$snap | Remove-Snapshot - confirm: $false

}
default {Write-host "input invalid, output... »}
}

Whenever I run the only choice VM, it works perfectly, but if I try clustered or input a text file with multiple computers I get the following message:

You can not call a method on a null value expression.

R:\MyScripts\Production Scripts\cbttest.ps1:6 tank: 41

+ $vmInfo.ExtensionData.ReconfigVM < < < < ($spec)

+ CategoryInfo: InvalidOperation: (ReconfigVM:String)], Runtim

eException

+ FullyQualifiedErrorId: InvokeMethodOnNull

No idea why?

Any help would be greatly appreciated!

You're grabbing a list of virtual machines in the cluster, and then of operations thereon as a whole.  You need to go and perform the operation on all of them.

Something like this (hacked):

$vmCluster = Read-Host "Please enter a Cluster name to reset the CBT on.»

$vmList = get-Cluster $vmCluster | Get - VM

$spec = new-Object VMware.Vim.VirtualMachineConfigSpec

$spec. ChangeTrackingEnabled = $false

{foreach ($vmName to $vmList)

$vmInfo = get - vm $vmName

$vmInfo.ExtensionData.ReconfigVM ($spec)

$snap = $vmInfo | New-Snapshot - name 'Disable CBT'

$snap | Remove-Snapshot - confirm: $false

}

Tags: VMware

Similar Questions

  • The Manager.exe HPConnection does not load correctly. An error message is displayed each time

    Hello

    I have recently upgraded to windows 8 and since then, I have a problem.

    The Manager.exe HPConnection does not load correctly. An error message is displayed every time that restarting the laptop.

    Would you please guide me how to solve this problem.

    Thank you in advance and I look forward to hearing from you soon

    Best wishes

    Hello

    Try the following

    Firstly, uninstall your current version of HP Support Assistant using Microsoft 'Fixit' at the following link: this is particularly useful for correcting problems that may prevent resettlement on the machines running a 64 bit OS.

    http://support.Microsoft.com/mats/Program_Install_and_Uninstall

    When this has completed, restart the laptop.

    Then download and install the latest version of HP Support Assistant of the page on the link below - the download links are to the bottom of the page.

    http://h18021.www1.HP.com/helpandsupport/HP-support-Assistant.html

    After installation, restart the computer again.

    Kind regards

    DP - K

  • Update firmware on Cisco SF300 using CLI

    Hi all!

    How can I update the firmware on Cisco SF300 using CLI?

    I have download the new Sx300_FW_Boot_1.4.0.88 firmware on the Cisco site. Inside of the archive, I found two files sx300_boot - 13506.rfb and sx300_fw - 14088.ros. If I understand correctly, sx300_fw - 14088.ros is the firmware?

    Through the command #copy tftp://mytftp/image image I stored the current firmware in my TFTP

    And now I have to use theftp://mytftp/sx300_fw-14088.ros command #copy t for update, right?

    This is enough to update the firmware? How can I use another file sx300_boot - 13506.rfb?

    Hello Ivan,.

    Below are all the controls you need during the upgrade. Please note that switch stores the 2 images and new firmware would go to a non-active image so you need to position the active image.

    image offtp://mytftp/sx300_fw-14088.ros t #copy

    #show bootvar

    image-x 1.4.0.88

    image-y a.b.c.d.

    #boot image-x SYSTEM

    for the boot code however:

    t #copyftp://mytftp/sx300_fw-13506.rfb boot

    After all these commands, you can restart the switch and check the boot code and firmware:

    #show version

    I hope this helps.

    Aleksandra

  • vSphere CLI: error: unknown command

    This could be as simple as just something I miss, but since I do not use the CLI much at all, I thought I'd ask just. I can connect to the CLI, but any command I use the host responds just with either "< command > not found" or when you use vSphere CLI "error: unknown command or namespace.

    I even tried connecting through my server vCenter Server and then go out to the host by using the command - vihost, that works, but I still get the error that the command I try to use it recognized.

    vSphere CLI

    C:\Program Files (x 86) \VMware\VMware vSphere CLI > esxcli - Server < servername > - username < my nickname-> password < password > vicfg - snmp.pl - Server < servername > public - c

    Error: Unknown command or namespace vicfg - snmp.pl


    You must run this command from the prompt (not hull as shown above) vSphere CLI commands and make sure the bin is in your path. Otherwise that run from here;

    C:\Program Files (x 86) \VMware\VMware vSphere CLI\bin> vicfg - snmp.pl - Server - username - password - show

  • Cannot add the vmkernel nic: a specified parameter was not correct. vSphere CLI + ESXi 4

    Hello. I try to add vmknic with frames in my distributed virtual switch.

    I read the vSphere command-line Interface Installation and reference Guideguide:

    "vicfg-vmknic - a-i DHCP"vmk5"

    I see the error message:

    Cannot add the vmkernel nic: a specified parameter was not correct.

    Vim.Host.VirtualNic.Specification.Ip

    What's wrong?

    I tried all the combinations of parameters with the same result.

    Ok! I've found a workaround.

    Since adding a vmkernel remote interface doesn't seem to work with DVS, I simply created one on a standard vSwitch and it then migrated to the DVS. And voila: the value 9000 MTU migrated intact with her! Here are the steps I followed:

    1. put the ESX host into maintenance mode - evacuate VMs manually if necessary

    2 remove the VMKernel iSCSI/NFS to the DVS interface

    3. create a standard virtual switch with no physical cards. He has no need to be a VMKernel VM Networking switch is fine. Make a note of the name you gave to the PortGroup created on the new vSwitch.

    4 using the remote control line, add the new interface vkernel specifying an appropriate jumbo MTU (9000) and the PortGroup on the standard new vSwitch. For example:

    esxcfg - vmknic.pl - Server

    If you get 3 answers, everything works. If you get failures, something has gone wrong. Go back and check that the interface is configured correctly using the command list esxcfg - vmknic.pl-.

    Enjoy!

    M

  • We will not burn SN-S082H CD player using iTunes - error 2131

    Hello

    I just bought a laptop PC Nextday with the SN-S082H command that will not burn CD using Itunes - error 2131 (I think from memory).

    Could someone let me know the solution to this?

    Thank you, Rob.

    I think that this error due to consistent problems.
    I read in some articles of the computer that the iTunes software is not fully compatible with different CD/DVD drives firmware.

  • Your device is not configured correctly(code 1) error

    Hello

    I have windows XP currently installed on my computer and I also have the new hard drive (seagate 500 gb) installed on my computer.
    I am facing the error with my cell phone (samsung galaxy s duos GT s7562) with my computer and I am unable to make any transfer of media through the PSG.
    Under portable devices > PSG > properties, I get the following message. > "this device is not configured correctly. (Code 1)
    To reinstall the drivers for this device, click on reinstall. When I try update driver it shows "your device is not configured correctly (code 1 error). I tried gel and reinstall driver MTP via "scan for hardware changes", but it does not yet solve my problem.
    How can I get my samsung android smart phone connected to my pc and start sharing media through the PSG. problem certainly lies in the pc.
    Help me out.i am going nuts about that...
    Pankaj.

    Hey,.

    have you found this KB link?

    See "Code 1" from the link

    Explanation of error codes generated by Device Manager in Windows XP Professional

    http://support.Microsoft.com/kb/310123/en-us

  • "High computer use" system error appears frequently.

    "High computer use" system error appears frequently. Minimum of 768 MB of virtual memory and 1149MB max, but using 902 MB. Also when this error occurs I'll check the details and parameters, and it shows that everything is normal. Do I have to change my swap file size, system not indicativ of a virus. I use Verizon 'high speed internet', but it doesn't seem to be high speed for me. I have cleared the system event logs, defragged the hard drive and played all Windows performance tools.

    "High computer use" is not a standard Windows message.  If this is in fact the message you see, you need to determine what application it brings and what it means.

    If this isn't the exact text that you see, please provide the full text of the message, without paraphrasing.

    In general, you should leave the page file setting in the ' System Managed.  Windows does a good job to manage page - better file that these articles "tweak your computer" might suggest.

    The speed of your Internet connection will depend on many factors, but you can get an idea of how "fast" your connection is using one of the speed of the tests here-->
    http://www.dslreports.com/stest
    http://www.Speedtest.NET/
    http://my.Verizon.com/services/Speedtest/

  • How can I correct - fatal execution error (0x7927f22e)

    How can I correct - fatal execution error (0x7927f22e).  I started having this popup after automatic update of Windows.  Also get error message MsiExec message saying that no debugger is found. What happened and how do I fi?  Thanks for help.

    Hi JimSrB,
     
    -Do you remember the number of the Knowledge Base article (KB) updates that have been installed recently?
     
    (0x7927f22e) Fatal execution engine error is due to corruption in Microsoft .net Framework.
     
    Try to repair Microsoft .net Framework and check if it helps.
     
    Write about the State of the question once you try this method.
  • The connection attempt failed because the modem (or other connecting device) on the remote computer is out of use. Error 777

    I've always used my blackberry to tether my phone but I get the following error message and I can't solve this problem, any help would be appreciated, thanks!

    The connection attempt failed because the modem (or other connecting device) on the remote computer is out of use. Error 777

    Hello

    It seems that the blackberry is not more.

    Pass the installation attaches on the blackberry and make sure that it is configured properly and work.

  • Getting error messgae"problem connecting to the Windows Error Reporting Service. Please try again later! "when you use the error report feature

    Original title: error report function

    When I use the error report feature a warning appears "problem connecting to the Windows Error Reporting Service. Please try again later! »

    It started some time ago and I have plenty of backup errors.

    Using W7

    Hi John,.

    I suggest running Disk Cleanup and selecting Remove all the Windows Error Reporting log files by selecting the checkbox and then click OK:
    Check if you are then able to start the Windows Error Reporting Service.
  • Correct use of snapshots

    Hello

    I would like to have comments about the correct way to use snapshots.

    Currently, I have a server ESXi 3.5 with 4 virtual machines.

    I use snapshots as follows:

    -J' still have 1 snapshot taken for each virtual computer

    -J' have regularly (before the size of the snapshot becomes too large) remove the snapshot and just after, take a new snapshot for each virtual machine

    -I will soon be able to make a backup of my virtual machines, but I don't now

    I recently started to monitor the size of my virtual machines, and they become several GB in just a few days.

    I wonder if it is efficient to always have a snapshot on each virtual machine.

    I'm starting to think maybe this snapshot should be taken just before to make a change on the server (installation of the software or other) to return to the State that we had before the operation, in the case where he's going poorly, then remove the snapshot after we have confirmed the operation went well, but should not exist at all times.

    Your comments are welcome! Thank you!

    Yann

    The snapshots are NOT backup anyway. If you use instant as replacement of backup then

    (1) you lose a costly storage space

    (2) that you have less reliable

    (3) you generate disk load high commit when snapshots

    What is the correct use of the snasphots:

    (1) you need to install a patch on your virtual machine

    (2) take the snapshot

    (3) install the patch

    (4) monitor behaviour of the system in case of patch broke something for awhile

    (5) commit instant if everything is ok, or go back to the snapshot if something bad happened.

    ---

    MCSA, MCTS, VCP, VMware vExpert 2009

    http://blog.vadmin.ru

  • Correct use of setControllerFactory in FXMLLoader?

    Hello

    I'm trying to load a node FXML using my own controller using JavaFX 2.1 included in the JDK 7u4.
    All discussions point to the setControllerFactory method, but when I try to apply the code below, the plant is never called leaving the node without the controller.
    (the FXML does not set the fx:controller).

    I've probably missed the correct use, but I can't understand. A tip?
     private Node loadNodeWithCtrl(final Object instance, String fxmlPath, ResourceBundle rb) {
            URL url = this.getClass().getResource(fxmlPath);
            FXMLLoader fxmlLoader = new FXMLLoader(url, rb);
            fxmlLoader.setControllerFactory(new Callback<Class<?>, Object>() {
    
                @Override
                public Object call(Class<?> paramClass) {
                    // Never reached <<<<<<<<<<<<<<<<<<<<<<< 
                    Logger.getLogger(this.getClass().getName()).log(Level.INFO, "Using provided controller");
                    return instance;
                }
            });
       
            try {
                Node node = (Node) fxmlLoader.load();
                return node;
            } catch (IOException ex) {
                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, null, ex);
            }
            return null;
        }
    Concerning

    Jean-Michel

    This is the correct behavior. Controller factories provide a way for an application to customize the construction of controllers specified via the fx:controller attribute. If you do not use fx:controller, then the controller factory will not be called.

  • How to use the error at the level of the mapping table?

    Hi all

    Please tell me how to use the errors table in the mapping level or how to handle errors in mapping.
    I create a table of errors in oracle, but I don't know how to use it in the map.


    Thanks in advance.

    Kumar

    Hi Kumar,

    You use the Table of errors with the data rule.

    Error tables are used with logical errors (data rules) managers. Detailed description on the use of data rules is explained in the following document

    http://www.Oracle.com/technology/products/warehouse/PDF/OWB10gR2_ETLandBusinessRules.PDF

    In a nut shell, use of the tables of the error is the following.

    1 create a rule of data associated with a table (target table or a table in which you load data).

    2. use the table in a map as a target table.

    3 deploy the table and mapping.

    Now, in the schema target a single table will be created with the name _ERR. When executing a mapping data that violate the rule of data enters the error table.

    The following must be done to have the name of the wrong choice of the customers table.

    1. right click on the table and click Configure.
    2. give the name of the table in the section "name of the shadow table.
    3 pull out the table.
    4. use this table in a map. Now in the mapping on this table properties in the section 'Error Table name' the name of the table that is specified in 'the shadow table name' will be fulfilled.

    Thank you
    Fati

  • What is the best way to correct the registry errors without the use of a registry cleaner in XP?

    I am sorry to raise this issue that so many people who have asked me.  I read pages and pages of discussions on the MS forum on this subject, and without exception, all the experts said Microsoft registry cleaners are completely unnecessary and that junk in the registers has no performance impact at all.  Instead, they say, to do x, y and z.  I am running Windows XP on my desk for five years, and gradually, he got so slow it's almost unbearable.  It takes 10-15 minutes just to start, and sometimes it takes 2 minutes or more just to open a window of browser (IE8) or go to the previous page by using the arrow to the left.  Before you tell me all the things it could be, please let me say that:

    1. my PC has not always been this slow!  It is getting worse.

    2. all my Windows software is up to date.  I have automatic updates on.

    3. I have a lot of disk space, almost 75% of free space on a hard drive of 80 GB.

    4. my PC is free of viruses, spyware and Trojans.  I have McAfee antivirus running and I also sometimes run Malwarebytes and Trojan Killer, because they always find things that don't have McAfee.

    5. I defragment my hard drive on a regular basis.

    6. I regularly delete all my temporary files by using the Windows Disk Cleanup utility.

    7. I have very little, if any "Add-ons".  No toolbar Yahoo or Google (or Bing!).

    8. I removed nearly every program that I start, so that they are not running in the background.

    9. I uninstalled all the programs that I don't use.

    However, I still have a slow ever-more computer.  Sometimes, when I see ads on TV to increase the speed of my PC, I download the 'free' software, and they claim to find hundreds or thousands of "registry errors.  When I look at the newspapers, I see many entries in registry for 'Netscape' and 'Google Earth', which I uninstalled years ago, as well as entries for the videos that I downloaded, seen once, and deleted a long time ago.

    So, what's the problem?  If it's not related to my registry (which Trojan Killer says has more 6 000 entries!), what else could be?  I would appreciate greatly any advice you can give, because there are dozens of companies on their touting their registry cleaners and the uninstall (for a price) programs, and after reading reviews of the MS MVPs, I'm skeptical of their claims.  Thank you.  :)

    I can't disagree with a lot of things have already been said.

    I'm willing to accept that your machine does actually takes 10 to 15 minutes on the clock. It's completely absurd.

    Some people call your "Windows Rot" problem. Becomes just the slower windows over time. It is a collection of things that are happening in the background. Yes I believe that the register contributes. Using a registry cleaner is not a "magic" solution But it can help a little.

    The PC care program/process you described is above average.  I suggest you add CCleaner. Disk Cleanup is not bad, CCleaner is better, cleaning of other stuff which does not resemble the DC. It won't be a significant difference because disk space is not your problem, but it will help a little.

    'Play' with the registry is VERY risky. If you decide to go ahead, I would say that first make you a copy of the full image backup using a utility that can be started and run from a CD/DVD. Just in case the registry cleaner breaks of your machine.

    Registry cleaners is that they take a "best estimate" to what is no longer necessary. Sometimes they think wrong. And each vacuum cleaner will clean slightly different sets of places.  If the tool does not provide a way to back up the registry before you start cleaning, do not use it. He is not careful enough.

    If vacuuming offer 'levels' of cleaning, enjoy. Open for more aggressive cleaning, with resetting and long series of normal use between cleanings.

    You are looking for a tool which also makes registry "defragmentation". The registry is a database that get disorganized by additions and deletions. Defragmentation will be re - organize and get rid of a 'lost' space, making it the smallest file, afterwards faster to read.  It is not something you need to do frequently, but since you've never done it in 5 years, it would help, after cleaning registry.

    Another place to find CPU and RAM wasted resources is Windows Services. These are small programs that start at boot time. They run in the background and provide support services to all applications or specific applications.  Many applications services are running even though you don't really need them. You can find information on which you can set by Googling for 'Windows XP hardening'. There are a lot of sites with good information. They call it hardening because by disabling unnecessary stuff, you leave less possible openings for the "bad guys" to the attack.

    Ultimately, I think your best bet will simply bite the bullet and re - install windows and all your applications. It's the best way to restore your computer to almost any performance fees factory. (It is not exactly factory fresh because you need to add a ton of Windows updates).

    Before you re-install, do copy image 1 or more full backups. At least one must be done using a tool that will easily allow you to extract the files. You data backup files separately to make it easier to restore the reinstallation. IE, copy it to a USB key.

    Many "experts" actually expect to, and do, re - install windows every 6-12 months!  I think it's a bit exaggerated, but they swear by it.

    Once you do your re - install, create a copy of the magnified image
    Install a firewall application (before the windows updates)
    Once you do all updates of windows, create a copy of the magnified image
    After that you re-install all your apps, create another copy of the complete picture.

    In this way, in the future, you have more current points to restore your computer to. It will reduce the time you spend to get back to the current configuration.

    On a 5 year old XP machine, you have probably 512 MB - 1 GB of RAM. You might also consider taking in the shop (or DIY) and bump the RAM up to at least 2 GB or better still max out.  The current versions of the applications use much more memory than they did 5 years ago. Even XP will be since he has been seriously corrected since then.

Maybe you are looking for

  • Qosmio X 775-use of CPU is more than 99%

    I have a Qosmio x 775 and all in (im won't lie), I played LoL, somehow evverything started going more slowly. My mouse barely moved, so I just leave and off my qosmio.Then I turned new and the problem got worse. It took like a minute to open the star

  • HP DC5750 Socket AM2 CPU upgrade

    Hello I have a HP DC 5750 MT P/N RN195ET I upgraded the power supply to a certified 430w 80 + and an ATI HD 6570 and 4 GB RAM pc26400, but for now the CPU reveals to me a bit of a bottleneck. For the moment I have updated the BIOS with the latest wor

  • How to make delay under 1ms

    Hey all,. I want to generate pulses of parallel port with a delay under 1ms, but when using the wait function in the real-time module and put 10 microseconds, it works as 1 ms delayhelp please,

  • Static/OSPF Redistribution fails for specific Routes

    Hello I have an ASA which is redistribution of static routes in OSPF with a standard access list and a roadmap (seq 10). For the most part, it works very well, however I have a problem where some networks will not redistribute. I have a network summa

  • Berkeley 5.0.84 - disabling writing statistical files

    Hi Chaps,Version 5.0.84 BerkeleyDB I now writes a stats and the configuration file in the directory of the environment. Although it is very useful in certain situations, we need to turn off to reduce the bloat of disc.Can anyone suggest the best way