11 Responses

  1. Jeff COuch
    Jeff COuch at |

    This is great Chris. Have you had any luck speeding up the module load times? We are seeing almost a full minute to load the core module.

  2. Leon Vak
    Leon Vak at |

    Thanks, Chris, your solution is clear and elegant.

  3. Peleg
    Peleg at |

    is there any way to load the vmware faster?
    it take up to 1 minute to do that, and the problem is that everytime i use it it’s with new session, any idea?

  4. Pasquale Lantella
    Pasquale Lantella at |

    in VMware vSphere PowerCLI 6.0 Release 2,
    when the module was allready loaded, to reload it would take 1 second, but when using the -force switch (to force to reload the module even when loaded) or when load the module in a new PSSession it takes 50 Seconds as you can see below. Any idea?

    PS C:\ Measure-Command -Expression {Import-Module -Name ‘VMware.VimAutomation.Core’ -Force -Verbose}
    VERBOSE: Loading module from path ‘C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Modules\VMware.VimAutomation.Core\VMware.VimAutomation.Core.psd1’.
    VERBOSE: Loading module from path ‘C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Modules\VMware.VimAutomation.Core\VMware.VimAutomation.Core.ps1’.
    VERBOSE: Dot-sourcing the script file ‘C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Modules\VMware.VimAutomation.Core\VMware.VimAutomation.Core.ps1’.

    Days : 0
    Hours : 0
    Minutes : 0
    Seconds : 48
    Milliseconds : 822
    Ticks : 488220129
    TotalDays : 0.00056506959375
    TotalHours : 0.01356167025
    TotalMinutes : 0.813700215
    TotalSeconds : 48.8220129
    TotalMilliseconds : 48822.0129

  5. Peleg
    Peleg at |

    Hi Chris, i got now 17 seconds time to load but it’s still slow, any ideas?

  6. PowerCLI 6.0 and vCheck, Vds Module | VirtualDataCave
  7. Jim Link
    Jim Link at |

    I’ve got PowerCLI v6r3 installed.. The auto-loading doesn’t work though. What do I have to do to make it work?

    For example when I tried your above steps:

    PS C:\Users\localuser> $env:psmodulepath -split (“;”)
    C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Modules

    PS C:\Users\localuser> get-module

    ModuleType Name ExportedCommands
    ———- —- —————-
    Manifest Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content…}

    PS C:\Users\localuser> Connect-VIServer
    Connect-VIServer : The term ‘Connect-VIServer’ is not recognized as the name of a cmdlet, function, script file, or
    operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
    At line:1 char:1
    + Connect-VIServer
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Connect-VIServer:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    Instructions for how to setup auto-loading would be much appreciated! Thank you

  8. Jerel
    Jerel at |

    Well, they did it finally. No more snap-in for VimAutomation.Core. The only way to load it in 6.5 R1 is by using import-module. I’m working through how I can properly load this depending on which version of powerCLI being used. Thoughts?


Share your point of view!