Slow speeding code with async?

Hello

I have two groups, one of 25 guests and one of 18 guests. For migration to vSphere 5.1 I need from these hosts of dvSwitch in standard vSwitch. I wrote a script that, for each guest, adds 150 virtual exchanges on the vSwitch, but is deadslow. He is now running two hours and only at half way.

Issues related to the:

-Can I speed up the process by writing better code?

-Would adding the async parameter - speed up things and this could potentially overload my vCenter?

Code:

$cluster = "Cluster01".

$ESXHost = get-Cluster | Get-VMHost

$report = import-Csv "c:\csv-files\list-01-standard-ports-voor-nieuwe-omgeving.csv".

foreach ($esxihost to $ESXHost)

{

Write-Host $esxihost. Name

foreach ($row in $Report)

{

Get-VirtualSwitch - VMHost $ESXiHost - name 'vSwitch0 | New-VirtualPortGroup-name $row. PortGroup - VLanId $row. VLAN

}

}

As much as I know there is no RunAsync switch on the New-VirtualPortgroup cmdlet.

The best opportunity to save time, is to do once the VirtualSwitch Get.

Something like that

...

foreach ($esxihost to $ESXHost)

{

$sw = get-VirtualSwitch - VMHost $ESXiHost - name 'vSwitch0.

Write-Output $esxihost. Name

foreach ($row in $Report)

{

VirtualSwitch news-VirtualPortGroup $sw - name $row. PortGroup - VLanId $row. VLAN

}

}

...

BTW, your script would about kill 43 puppies

Tags: VMware

Similar Questions

  • Airport express at slow speed of the modem Arris SB6190

    Hello!

    My so-called WIFi Comcast gives me 150Mbps. My test only show 70 or slower speed on a WiFi test. After the call to them they told me to talk to my modems customer service. But their customer service is terrible. Here is my setup and yes everything has been switched off voltage and reset. And Comcast has been created with the modem while the Comcast guy was here. From the start after a few hard reset the express worked. Here's the question and the installation program.

    I have a SB6190 (not wireless), Arris directly connected to my Airport express. The express (which deals with my wireless connection) is connected to a switch (for wired devices). But I think that my problem is the Express. ? Not sure, I guess my question is I do something wrong in public services from the airport with the Express settings? I do not see why I get more 75Mbps wireless. Or maybe Apple if your reading, you can give it a fix on your next update. Hope you can help and thanks!

    Here some thoughts:

    (1) the Airport Express uses 100 ports Ethernet of Mbit/s, so the theoretical maximum speed that could be achieved with an Ethernet or Wi - Fi through the Express would be 100 Mbit / s.

    (2) the Express is not known for his speed wireless. On a connection of 100 Mbps Internet here, I see usually 45 - 50 Mbps at best more wireless, no matter if the 2.4 GHz or 5 GHz is used.  Ethernet checks better about 75-80 MB/s to the Express LAN port.

    (3) these are user to user support forums, so it is very unlikely that anyone from Apple will ever see your post. If you want to provide feedback to Apple, you can do so here: Apple Apple - AirPort Express - Feedback will acknowledge receipt of your message, but they will not respond after that.

    (4) the AirPort Express was introduced almost 4 years ago and it's been 2 years that Apple has provided an update firmware for the product, so additional updates are not probably... my opinion.

  • Slow speed of the internet in the normal mode and fast speed in SafeMode - Win 7 Home Premium

    Hello

    I have a slow speed of ~ 5MB internet when I was on about 30 MB. I thought he was the provider, but my laptop under that Win Vista Home Premium Wireless is fine and I got 23 MB download speed. The office win 7 Home Premium - use Firefox browser version 31, avast antivirus and virginmedia super hub 2.

    Someone at - it ideas please? I'm frustrated by the slow - flying it in safe MODE.

    No problem, it is stated in the pilot with no yellow question mark.

    Any help would be welcome at this depressing time.

    Would it be the power supply PC or modem/router (but if it works in safe mode, it is unlikely?)

    Thank you

    Steve

    Hello

    I found it's an AMD program called Quickstream AMD that is supposed to do a slow connection for streaming video faster, but it had the opposite effect for me. I have since got rid of him and we're back to a speed of 30 MB + I had before. I have just the graphics drivers now :-)

    Concerning

    Steve

  • Intel wifi link 1000 bgn on Hp laptop connection only to 65 Mbps or Mbps even 58, then 130 for 1 second then back to slow speed.

    I recently bought a computer hp laptop and enjoy wireless n to my house.  I have an another hp laptop which connects to 130 Mbps and never changes.  This laptop however changes constantly and never stays in 130.  It is generally about 58 or 65 and then change during 1 second to 117 or 130 then back to slow speed.  I noticed on the laptop properly configured, it says:
    IPv4 Internet connectivity
    local IPv6 connectivity
    active state media
    130 Mbps speed

    On slow computer, he States:

    IPv4 Internet connectivity
    IPv6 connectivity no internet no access
    active state media
    65 Mbps speed

    I don't know if this means anything, but I guess for this.  Is there something misconfigured on laptop #2 or what?  I can't understand this.  I would like to be sure that this adapter in this laptop is also able to maintain 130 Mbit/s, but there are no at that speed.  Any help would be greatly appreciated.
    Thank you

    I had the same problem with the same Intel adapter WiFi 1000 BGN.  Two things fixed.  My router by default, the band of 2.4 Ghz to a maximum of 130 Mbps for backward compatibility.  Change this 300 Mbps.  Second if your router allows you to set the parameters for QoS make you that WMM is enabled.  Thirdly, map properties network by default to the following on the old card NETWORK interface:

    Channel 802.11n for 2.4 band width = 20 Mhz only

    802.11n mode = disabled

    Ad Hoc QoS = WMM disabled

    The default values have the capacity "N" disabled, because when the card shipped first Wireless N routers were rare, and it has improved the flow of 'G '.  Change them to 'Auto', 'Enabled' and 'active WMM.  The last of them allows the priority to multimedia for the peer-to-peer network data local transfers (i.e. - video streaming, music between two computers in the same House).  Hope that helps.

    Shane

  • We could not verify your address. We could not pair your zip code with your state. Please see the bulletin.

    How to solve this "we couldn't verify your address. We could not pair your zip code with your state. Please review. » ?

    Well, the obvious answer is to make sure that the zip code is valid for the State you entered.

  • create the code with this code snippet

    I'm curious...

    I can't create a snippet of code with this code. (located in the first post)

    http://forums.NI.com/T5/LabVIEW/event-structure-with-value-changes/m-p/1937505#M646059

    However, I can create excerpts of its subsections.

    Tried different versions of LabVIEW with the same result.

    Can someone create a snippet?  Just curious.

    I'm not stuck or anything... just curious...  Maybe I should have posted the breakpoint...

  • Compile the external code with Microsoft Visual C++ 2008 Express Edition

    Hello

    I'm trying to compile c code to work with Labview (CIN or dll). In the past I did without problem using visual studio. I'm having a really hard time compiling the code with

    Microsoft Visual C++ 2008 Express Edition. I'm trying to compile one of the examples that come with Labview (multiply 2 numbers for example).

    I don't know how to set the project with Microsoft Visual C++ 2008 Express Edition. I read on the web something make a folder of lvm with Labview makefile. Is this really necessary? If so, how to create this file?

    Thank you

    Eyal

    Thanks for your reply.

    In fact, I found a way to create a dll on the web:

    http://decibel.NI.com/content/docs/doc-1690

  • Signature on a router encrypted on a Windows XP Edition network.with family business, access encryption code is I can't get Windows to accept a code with so many characters and length 55 numbers

    Original title: signature on a router encrypted with Windows XP Home Edition

    I have a Toshiba laptop with Windows XP Home Edition. I am trying to connect wireless to a Cisco router on a corporate network. Encryption access code is length 55 numbers and I can not get Windows to accept a code with so many characters that I can on the router. Is this because I use Windows Home version? Y at - it an upgrade that will help you? Will I be more successful if I update to Windows XP Professional?

    Hello

    You should contact the support staff of assistance companies.

    You can also try to post this topic on the TechNet forums: http://social.technet.microsoft.com/Forums/en-US/category/windowsxpitpro

  • use different JADs to deploy a COD with different properties

    I've never had different JADs to work for the Web site deployment.

    This is the problem, I use getAppProperty MIDLET to get a property.

    I create a file myMidlet.COD with myMidlet.jad which has a property of the HOST.

    I have ten different JADs with different HOST property on a Web site for

    a myMidlet.COD that will be deployed. The midelt deploys nicely on the Blackberry

    but the HOST is the same as that used to build cod. They gave me a code snippet and

    added some debug statements to see what this thing of Module

    public class mybbProperty {}
    CodeModuleGroup [] allGroups;
    CodeModuleGroup myGroup = null;
    String moduleName;
    Boolean flag = true;

    public void mybbProperty() {}
    }

    public void init() {}
    versForm.debugtext += '\n init';

    AllGroups [CodeModuleGroup] is CodeModuleGroupManager.loadAll ();.
    versForm.debugtext += "\ngroup;
    moduleName = ApplicationDescriptor.currentApplicationDescriptor () .getModuleName ();
    versForm.debugtext mode += "\n" + moduleName;   Note ModuleName is correct and is "myMidlet".

    for (int i = 0; i)< allgroups.length;="" i++)="">
    versForm.debugtext += "\n"+allGroups[i].getFriendlyName ();

    If (allGroups [i] .getFriendlyName () .equals ("myMidlet")) {}
    versForm.debugtext += "\n"+allGroups[i].getFriendlyName ();
    versForm.debugtext += "' \n * found"; "
    for (Enumeration e = allGroups [i] .getModules ();)
    e.hasMoreElements () {}
    versForm.debugtext += "\n *"+ e.nextElement (); "
    }
    myGroup = allGroups [i];
    break;
    }
    for (Enumeration e = allGroups [i] .getModules ();)
    e.hasMoreElements () {}
    versForm.debugtext += "\n *"+ e.nextElement (); "
    //            }

    If (allGroups [i] .containsModule (moduleName)) {}
    myGroup = allGroups [i];
    break;
    }
    }
    versForm.debugtext += "\n end";

    }

    public String getAppProperty (String name) {}
    If (flag)
    init();
    flag = false;
    versForm.debugtext += "\n getAppProp"+ name;
    If (MyGroup is nothing)
    Returns a null value.
    Return myGroup.getProperty (name);
    }
    }

    I use the function mybbProperty.getAppProperty ("AppMyHost");

    I noticed that the getFriendlyName() is the name of my Application, so I use it and

    print information. Did I get this

    mybbProperty mybb = new mybbProperty();

    String s = mybb.getAppProperty ("AppMyHOST");

    myMidlet

    * Found

    * myMidlet-3

    * myMidlet-2

    * myMidlet-1

    of course, which returns null. So how do JAD another properties which was used to deploy the

    App for Blackberry. In Nokia its pretty simple use MIDlet getAppProperty() you need a jad and jar for

    deploy it.

    In any case, I don't know which module to get. The JAD I used to deploy the cod was called green.jad

    so I have no idea why myMidlet is important. I wouldn't see green.jad somewhere?

    Anyway, I would appreciate any code that does this correctly.

    Please see this thread on this issue.

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=10&query.ID=5227#...

  • Format of code with dashes does not, once again...

    Hello, guys

    I know that this has been discussed several times before and I checked the previous forum discussions, but this did not help.

    I can't always format source code with the dashes.

    My settings:

    Screenshot_4.jpg

    None of them work for me (Mac or PC):

    Screenshot_1.jpg

    Is there anything else I need to do? Hidden settings or configuration to fix files?

    Thank you in advance!

    P.S. using Dreamweaver CC 2015.3 on Windows 10 and Mac OSX 10.11.5

    Click on libraries of tags in your first screenshot to change the behavior of indentation of these tags.

    Choose "Formatted and indented" in the drop down content.

  • How can I put HTML codes with muse cc? I have to put a watch on my site, I only codes HTML

    How can I put HTML codes with muse cc? I have to put a watch on my site, I only codes HTML

    Hi Antonio,.

    You can use the object > option to insert HTML code to add your code to the page.

    Kind regards

    Aish

  • Erratic behavior CBWMS view code with code disappears

    This just started today: behavior seen very erratic code with the code disappears.

    As I am writing code, or by selecting the code, he suddenly disappears. Sometimes portions of code disappears and shows a small section that is stressed.

    If I select a photo in design mode, it can also disappear.

    I tried reinstalling Dreamweaver, deleted the Setup folder, preferences removed, but seems to come back.

    Has anyone seen this type of erratic behavior before?

    Here is an example of the strange underlined text (under 'c'):

    Screen Shot 2014-02-21 at 6.57.23 PM.png

    If I select an underlined letter and keep typing, it continues the line in mode code like this:

    Screen Shot 2014-02-21 at 7.29.44 PM.png

    Once this emphasis indicates somewhere, this is the beginning of other erratic behaviors such as images or code disappears suddenly, etc..

    It started to happen after upgrading creative cloud today.

    Try to turn off dictation & speech recognition in your system settings.

    Nancy O.

  • Warp stabilize AND slow speed

    I want to warp stabilize AND slow speed which are incompatible, so what is the recommended route on this please?

    FOR EXAMPLE, I believe that we must export an and re-import to another, or what? In what order?  Is there a smarter way?

    Export of reimportation down Imaging?  These sorts of things.

    Thank you

    Steve Z

    Stabilize first.

    Choose an export format uncompressed to the DI.

  • completion of code with breakpoint

    I would like to know Dreamweaver does support code hint, completion of code with breakpoint for the developer.

    I can't find the function when I start to generate the web site application.

    Your information and help is much appreciated,

    Kind regards

    Iccsi,

    Watch this short video about the code hinting and completion:

    http://www.YouTube.com/watch?v=uSLIh7uo02U

    Nancy O.

  • How to compile java code with @Override in JDeveloper 11 g

    Some Java code that I use have "@Override" linked, such as the following:

    launcherFrame.addWindowListener (new WindowAdapter() {}
    @Override
    public void windowClosing (WindowEvent e) {}
    System.Exit (0);
    }
    });

    When I build these codes in JDeveloper 11 g, I'll get compiler error

    Error (170,16): the windowClosing (java.awt.event.WindowEvent) method does not override any method in its superclass

    However, if I build these codes it using javac directly outside of JDeveloper, construction will not complain. If I use eclips, he did not complain either.

    Can someone tell me how to build these codes with @override in JDeveloper 11 g?

    Thank you very much!
    Cheng

    What version of jdev do you use? Jdev 11.1.1.2.0 use javac as the compiler. Check your compiler settings in project node.

    Timo

Maybe you are looking for