PowerCLI

 View Only
  • 1.  Error upgrading PowerShell 2

    Posted Feb 02, 2010 07:07 PM

    I am trying to get snapshot size info and installing the VI Toolkit Extensions (http://vitoolkitextensions.codeplex.com/). I was at PowerShell 1.0 so I removed that and reinstalled the following:

    PowerGUI 2.0.0.1082

    PowerShell ISE 2 CTP 3

    vSphere PowerCLI 4 U1

    When trying to install the VI Toolkit Extension 62528, I get the error "Usage: powershell_ise.exe or powershell_ise.exe fileName.ps1". So I assume this has not installed correctly. I get the same error when I try to launch vSphere PowerCLI. When I launch PowerGUI and select "Start Powershell.exe", I get the message "Unable to start PowerShell.exe".

    If anyone has any recommendations on how to get back to an operational state would be appreciated.



  • 2.  RE: Error upgrading PowerShell 2

    Posted Feb 02, 2010 09:45 PM

    I would advise you to use PowerShell v2 RTM instead of CTP3.

    There is probably something wrong with the installation CMD.

    Luckily you can install the module manually as well.

    Do a

    Get-Help about_modules
    

    and you will see how you can install the module (and where).

    ____________

    Blog: LucD notes

    Twitter: lucd22



  • 3.  RE: Error upgrading PowerShell 2

    Posted Feb 08, 2010 06:20 PM

    Still can't import the module...

    PS C:\powershell\Modules\vitoolkitextensions-62528\coreModule> import-module C:\PowerShell\Modules\vitoolkitextensions-62528\coreModule\

    Import-Module : The specified module 'C:\PowerShell\Modules\vitoolkitextensions-62528\coreModule\' was not loaded because no valid modu

    le file was found in any module directory.

    At line:1 char:14

    + import-module <<<< C:\PowerShell\Modules\vitoolkitextensions-62528\coreModule\

    + CategoryInfo : ResourceUnavailable: (C:\PowerShell\M...528\coreModule\:String) , FileNotFoundException

    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

    C:\PowerShell\Modules\vitoolkitextensions-62528\coreModule>dir

    Volume in drive C is rtpvcb70_c

    Volume Serial Number is CC65-56E0

    Directory of C:\PowerShell\Modules\vitoolkitextensions-62528\coreModule

    02/03/2010 11:28

    .
    02/03/2010 11:28

      ..

      02/03/2010 11:58 14 Null

      02/02/2010 08:51 128,755 viToolkitExtensions.psm1

      2 File(s) 128,769 bytes

      2 Dir(s) 975,971,975,168 bytes free



    • 4.  RE: Error upgrading PowerShell 2
      Best Answer

      Posted Feb 08, 2010 07:18 PM

      You have to specify the .psm1 file if you want to load the module from a non-standard directory.

      Something like this

      Import-Module "C:\PowerShell\Modules\vitoolkitextensions-62528\coreModule\viToolkitExtensions.psm1"
      

      Afterwards you check the functions like this

      Get-Command -Module viToolkitExtensions
      

      Let me know if that works.

      ____________

      Blog: LucD notes

      Twitter: lucd22



    • 5.  RE: Error upgrading PowerShell 2

      Posted Feb 08, 2010 08:35 PM

      Thanks...I have the module installed now. The SizeMB returns the total disk consumption for the VM, but I thought it would return just the size of each snapshot.

      get-vm | get-tkesnapshotextended | select name, vm, sizemb, created, description