script requires a lot of time

I made a script to check if some of the pictures are left.

In the past, it works fine, but now I noticed, that the script needs a lot of time to complete. The VCenter CPU load goes up to that time there.

Is this normal, that it takes so long? (37Hosts/670VMs)

$viserver = Connect-VIServer our_vcenter
$allvm = get-vm
$report = @()

foreach ($snap in ($allvm | get-snapshot)) {
     
     $row = "" | select vmname, pstate, created
     $row.vmname = $snap.vm.name
     $row.pstate = $snap.powerstate
     $row.created = $snap.Created
     $report += $row
}

$body = $report | ft -auto | out-string
$smtp = new-object Net.Mail.SmtpClient(”our_mailserver”)


$smtp.Send(”admin@domain","admin@domain”, “Snapshots”, $body)

Disconnect-VIServer -Server $viserver -confirm:$false

The cmdlet Get-Snapshot has some problems in PowerCLI 4u1.

____________

Blog: LucD notes

Twitter: lucd22

Tags: VMware

Similar Questions

  • In bulk FORALL delete statement it requires a lot of time

    Hello

    When I run block FORALL delete instruction it requires much time even to 10 lines deletion.so how to avoid this problem? I checked SGA_TARGET and max_size and PGA_TARGET cureent_size are the same for both. Is there is problem of memory?


    Thanks in advance

    Vaibhav

    Please look at this:

    http://psoug.org/definition/limit.htm

    If you add the LIMIT 100 part to your query to collect your bulk / construction forall will treat 100 records per part.
    This will avoid to fill with undo tablespace / PGA in memory.

    There is also a weather of discussion to use 100 LIMIT or LIMIT 1000 (or MORE).
    It depends on what your system can handle, if it is a declaration of production occupied, I would stick to a value of 100.
    Reason for this, is that your request will not be a huge amount of PGA.

    DECLARE
    TYPE t_id_tab IS TABLE OF test.c1%TYPE;
    l_id_tab t_id_tab := t_id_tab();
    Begin
    
    dbms_output.put_line(DBMS_UTILITY.get_time);
    
    select c1 bulk collect into l_id_tab
    from TEST where c1<=150000
    LIMIT 100;
    
    FORALL i IN l_id_tab.first .. l_id_tab.last
    
    delete from TEST where c1= l_id_tab(i);
    commit;
    dbms_output.put_line(DBMS_UTILITY.get_time);
    End;
    

    We use this construction to load data into our warehouse and pushed the LIMIT 100 part during the test.
    He did speed things up considerably.

    (Risky!) something else is to do:

    -- exclude table from archivelogging
     ALTER TABLE TEST NOLOGGING;
    -- execute plsql block
     
    -- enable logging on the table
     ALTER TABLE TEST LOGGING;
    

    The risky part, is that you get incompatible in this way archivelogging because your losses are not recorded.
    When you perform a restore of backup and want to roll forward until the last change in your archive logs, you won't miss these deletions, and your table is not consistent with the rest of your database.

    In our warehouse situation that we don't mind, the data gets updated every night.

    I hope this helps!

    Robin

  • How do to this chain operation looks simple but causing a lot of time to do :)

    Hi all

    I have a very large chain, i.e. the soap xml response send by server that I read once connected to the server using http, now the problem is that I need to create a Document out of it and analyze what is simple but the answer I get server requires many replacements of string as example 1) replacing "<" with "<"  2)="" replacing="" ">"="" with="" "="">" etc before creating a document out of it now there are many such replacements in the sending of the response from server that takes a lot of time. 5 minutes on the emulator. So my question is how do? Is there a native method to replaceAll occurrences of a substring in a string or while I can use or is there another good way? Please let me know thx.

    Thank you

    Sagar

    We took over a project done by someone else, and they were doing exactly what you do.  Here is their source, which I think is more effective that you give it a try if you want.

    But be aware that I have never used or tested this code.

    I guess you pull that string to the center of your SOAP response.  It has been encoded XML.  So you can do what we did in this case and wrap the string as a data element in an XML element and then use the XML parser to get the actual data, which feed us an XML parser again to get the actual data.  XML is already set up to deal with these characters, so it was more effective than the approach to replace.  Actually to be honest, it wasn't the reason we exchanged, that as part of the parser XML meant we were convinced it was done correctly.

     public String replaceAll(String source, String pattern, String replace) {
            if ((source != null) && (pattern.length() > 0)) {
                final int len = pattern.length();
                StringBuffer sb = new StringBuffer();
                int found = -1;
                int start = 0;
    
                while ((found = source.indexOf(pattern, start)) != -1) {
                    sb.append(source.substring(start, found));
                    sb.append(replace);
                    start = found + len;
                }
    
                sb.append(source.substring(start));
                return sb.toString();
            } else
                return "";
        }
    
  • Firefox has become very slow. It takes a lot of time to load any website. I reinstalled FF but the fleeting problem.

    Firefox has become very slow. It takes a lot of time to load any website. I reinstalled FF but the rest of the problem.
    As a test, I downloaded Chrome and it is much faster.
    But I love FF and would be very happy if you can help me solve this problem.

    Hi Reos,

    When you reinstall Firefox it always uses your old profile with all the old things that you had. That said, you're lucky, there is a new feature that lets you "Reset" of Firefox. This will remove some of the pieces that might cause problems while it keeps your bookmarks and other important things safe.

    Check it out and let me know if it works: Refresh Firefox – reset the parameters and modules

  • When I turn on my computer until the start menu is ready before I click on internet, it really takes a lot of time

    When I turn on my computer until the start menu is ready before I click on internet, it really takes a lot of time. Why?

    Hello

    Did you do last changes before the show?

    I would like the season you follow the steps in the link and check if that helps.

    Method 1: Perform a boot clean and chcek if it helps.

    How to configure Windows XP to start in a "clean boot" State

    Note: Once the diagnosis has been made, make sure you try the step to configure Windows to use a Normal startup state in the article in order to reset the computer as usual.
     
    Method 2: You can also check out the link and check if it helps.
  • Error 1720. There is a problem with this windows package install. a script required fpr this installation to complete could not be run.

    Error 1720. There is a problem with this windows package install. a script required fpr this installation to complete could not be run. Contact your provider to support personal or package. action Coustom DelAppData error script-2146828283. Argument or appeal of Microsoft VbScript runtime error: invalid procedures: "Left" line 22, column 1.

    Contact the technical support for the program that you are trying to install. MS - MVP - Elephant Boy computers - don't panic!

  • Error message from Windows XP Pro SP3 1720 Windows installation Script required

    Original title: WINDOWS XP PROFESSIONAL VERSION 2002 SERVICE PACK 3-__ERROR MESSAGE 1720 FOR WINDOWS - installation SCRIPT REQUIRED FOR INSTALL NOT running.

    I get error message 1720 whenever I try to install an Internet card mobile broadband (MC760) at Virgin Mobile

    Hello Ivpg1963,

    I saw a suggestion in another forum that said to remove drivers Virgin Mobile via Add/Remove programs.
    Then, remove the Novatel directory in Program Files. They claimed that remove the directory was the key.

    Then add the drivers of Windows XP to return to the large map Strip MC760.

    Please reply back and let us know if this can help.

    Thank you

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Erroe Code 1720: There is a problem with this Windows Installer package. A script required for this intall could not be executed.

    I have Windows Vista with Service Pack 2 installed on my system.  I am trying to install a small program.  The installation process starts, but soon, I get the following error message: Error 1720: there is a problem with this Windows Installer package.  A script required for this intall to complete could not be run...  How can I solve this problem?

    Try the steps mentioned in the answers marked by kmlure and Imran Chand at the following link: http://answers.microsoft.com/en-us/windows/forum/windows_vista-windows_programs/error-1720-there-is-a-problem-with-this-windows/0b965fe8-2d16-498c-bb88-395911e13146

    If you have downloaded the program, you can try to download it again or check if there is a different place, you can download it since the file itself is not the problem.

  • Error code 1720: there is a problem with this Windows Installer package. A script required for this installation could not be executed.

    I have Windows Vista (with Service Pack 2) installed on my system. I am trying to install a program called HotDocs.  HotDocs is a document generation program.  The installation process is arrested shortly after it starts and I get the following error message:

    Error 1720. There is a problem with this installation package. A script required for this install to complete could not be run. Contact your provider to support personal or package. Custom action script error,: line, column,.

    I tried to use msconfig to determine if any service could interfere with the Windows Installer (none appeared to be - their judgment has not solved the problem of turing), run the installation as an administrator, and help from Microsoft 'Fix It' Troubleshooting Guide (for installation problems), but none who has eliminated the problem. I also contacted the HotDocs seller and they had no solution for the problem and have not all reports other customers that their program was causing a problem.

    Other solutions to this problem?

    Thank you!

    Hello

    1. did you of recent changes to the system?

    2. do ths problem occurs when you try to install another program?

    3 did you perform the clean boot completely?

    Follow the steps mentioned below and check if that helps.

    Step 1:

    Follow the steps from the link below and check if that helps.

    http://support.Microsoft.com/kb/2438651

    Step 2: Perform a clean boot

    If you have not completely run the clean boot, try to make it completely.

    Follow the steps in the link below to perform the clean boot.

    http://support.Microsoft.com/kb/929135

    Note: once you are done with the boot, follow step 7 in the link to your computer in normal mode.

    It will be useful.

  • Error installation windows re-setup - a script required for this installation to complete could not be run

    Original title - how to reinstall windows install

    When you try to redownload the installer windows Iget a msg that says: a script required for t his install to complete could not be run.

    Hi nyyankee53


    You can check if the antivirus or other security software raises questions. I would say to you temporarily disable the security software installed and check if the problem is resolved.

    If you disable any security software for troubleshooting temporarily, so don't forget to activate after troubleshooting is completed that your computer will be at risk.

    See the help link - below
    http://Windows.Microsoft.com/en-us/Windows-Vista/disable-antivirus-software

     

    I hope this helps.

  • Windows 7 and update MSSE take a lot of time

    Hi, I have reinstall my windows 7. But, when I try to check the updates he comes to see the verification of updates for a long time. I'm trying to update Microsoft Security essentials too, but it just search for updates and it takes a lot of time too. But, when I restart the Windows Update service, and then start the download of the Microsoft Security Essentials updates and install it, but not for windows, it keeps looking for updates when I try to update. Microsoft Security Essentials does not download the update that automatically even my computer is connected to the internet, I have to press the Refresh button on MSSE, and sometimes I need to restart the windows update service too.

    When I do the update for windows for the first time, Windows update tell me to install the Windows Update Agent 7.6.7600.320. And install it.

    Please, please help. Any who...

  • Error message: "there is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your supplier of staff or the package of support ".

    Original title: problem with the Windows Installer Package

    I am trying to install an update for my video FlipShare program and I get the following error message "there is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your provider to support personal or package. Anyone has any ideas to fix this?

    Would be - what your anti-virus program blocks scripts? See:

    Error a Script required for this install to Complete could not be run when you run a Microsoft Fix it Solution! -Microsoft Fix it BLOG - Site Home - TechNet Blogs:
    http://blogs.technet.com/b/fixit4me/archive/2009/03/31/error-a-script-required-for-this-install-to-complete-could-not-be-run-when-running-a-Microsoft-fix-it-solution.aspx

    Ramesh Srinivasan . The Winhelponline Blog
    Microsoft MVP, Windows desktop experience

  • Question Windows Spider solitaire game flashes and I can't move cards unless I have click or drag a lot of times.

    Original title: Spider Solitaire not good

    Spider Solitaire is flickering, and I can't move cards unless I have click or drag a lot of times.  The simple answers please because I am not technical minded.

    Hello

    ·        This only happens with solitaire and spider or other games as well?

    ·        You did changes to the computer before the show?

    Method 1: I suggest you to put the computer to boot and see if the problem still occurs.

    http://support.Microsoft.com/kb/929135

    Note: after a repair, be sure to configure the computer to start as usual as mentioned in step 7 in the above article.

    Method 2: Update the video card driver and check if this solves the problem.

    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

    Method 3: The problems of the game performance

    http://Windows.Microsoft.com/en-us/Windows7/fixing-game-performance-problems

  • My win 7 laptop HP takes a lot more time at the stop

    MY LAPTOP ABOUT 4 WEEKS IT Y HAS SUDDENLY STARTED TAKING AGES TO STOP

    CONFIGURATION SYSTEM USED IVE, DISK CLEANUP, DEFRAGMENTATION IT REGUALLY.

    CAN ANYONE ADVISOR AS TO WHETHER BACKGROUND PROGRAMS COULD BE INITIALLY - AND HOW DO I FIND AND REMOVE?

    MY LAPTOP RUNNING WINDOWS 7 HOME PREMIUM SUDDENLY TAKES A LOT OF TIME DOWN

    Here's one thing you can check which will give information in some cases: http://windows.microsoft.com/en-US/windows7/Why-wont-my-computer-turn-on-or-off-quickly

  • Table statistics generation takes a lot of time in 10g R2 (10.2.05)

    Hello Oracle Experts!

    Need your urgent help...

    Question - generation of Table statistics takes a lot of time in 10g R2 (10.2.05) and even ends in mnts in a different database. As well the database are hosted on the server VM, RAM, CPU, storage and database initialization parameters are the same.

    Table - size 34 GB

    Name of the table - SLPDOCTAX

    SQL - exec dbms_stats.gather_table_stats (ownname = > 'FAST', tabname = > 'SLPDOCTAX', estimate_percent = > 30, cascade = > true, level =)
    (> 5, method_opt = > 'for all COLUMNS INDEXED' granularity = > 'ALL');

    Measures taken so far-

    1. 1) checked the IO by the dd, no problems on the side of DISK command
    2. 2) use memory and CPU as normal

    Please advise what measures must be taken to solve this problem

    Dear all,

    We have identified the problem... It was the index and even has been resolved by rebuilding the index.

    Rgds

    Farvacque

Maybe you are looking for

  • Updating Firefox, my old profile said places.sqlite.corrupt and I can't get bookmarks

    Firefox crashed while and refreshed himself. He created a "old firefox data" folder on my desktop. I thought I followed the instructions correctly, I deleted the profile information in my new program firefox (appdata). and I copied pasted old data fr

  • Yoga 900 wake from sleep

    Hello My 900 Yoga has awakened from his sleep in my backpack many times. I tried to find a setting to disable the keyboard while the computer is in sleep, but I couldn't find one. I asked support about this problem and they are not too a solution. I

  • Intensity background xy graph is possible?

    Hi, I am trying to display the graphic background color in respect to the value of the amplitude. The black plot mark background color. Is this possible in XY graph or any way to do it? Kind regards.

  • Want 5530 Web services

    I just bought a printer Envy 5530. As he tried to set up ePrint services, although there is a strong WiFi to the network, an error appears when trying to connect to web services that says: "server connection error: the printer could not connect to th

  • BlackBerry Smartphones from switching to the network of the company for streaming?

    I want the box under Options tiked"switching to the enterprise network for broadcast?