PowerCLI

 View Only
Expand all | Collapse all

PowerCLI Version

  • 1.  PowerCLI Version

    Posted Apr 17, 2018 12:55 PM

    Hi all,
     

    I've installed PowerCLI 6.5 on my Computer. When I type " Get-Module -ListAvailable VMware.PowerCLI " or " Get-PowerCLIVersion ", I get that I've probably vesion 10.0 installed, like the image below.  What me surprised is that, when I run these scripts on Commandline  using "%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command "Get-Module -ListAvailable VMware.PoweCLI" " I get nothing!!

    When I go to programms installs/uninstall I see PowerCLI version 6.5 !!


    Could someone help me :)

    Thanks



  • 2.  RE: PowerCLI Version

    Posted Apr 17, 2018 01:02 PM

    Oops, looks like you multiple versions installed.

    What I would suggest:

    • Uninstall the MSI installation via Programs and Features
    • Remove all the PowerCLI modules. Check the folders where they can be via $env:PSModulePath
      • Make sure to check for 32- and 64-bit folders (if you have both PowerShell versions on the station). You can start both versions from the following folders
        • C:\Windows\System32\WindowsPowerShell\v1.0
        • C:\Windows\SysWOW64\WindowsPowerShell\v1.0
    • Eventually, reboot the station
    • Install the latest version with Install-Module


  • 3.  RE: PowerCLI Version

    Posted Apr 17, 2018 02:28 PM

    Hi,

    thanks for your Aswer :smileyhappy:
    I did that but still get " VMware PowerCLI 10.0.0 build 7895300 " when I type " Get-PowerCLIVersion ".
    But when I type "  Get-Module -ListAvailable VMware.* " or " Get-Module -ListAvailable VMware.PowerCLI "

    I get nothing, since I did get the Version 10 bevor I uninstalled PowerCLI and its Modules.
    I dont understand it, in the Dokumentation " Get-PowerCLIVersion " gets the version of the installed PowerCLI.

    How could this happen?

    Best regards



  • 4.  RE: PowerCLI Version

    Posted Apr 17, 2018 02:31 PM

    What do you have in the variable $env:PSModulePath?



  • 5.  RE: PowerCLI Version

    Posted Apr 17, 2018 02:37 PM

    I've got 4 pathes, I have deleted all PowerClI modules from these pathes!
    furthermore when I type " Uninstall-Module -Name VMware.PowerCLI " I get this error message (the same error by update, install too!!)

    (

    Uninstall Modules: The naming "Uninstall Module" was not named as a cmdlet, a function, a Script file or an executable program detected. Check the spelling of the name, or whether the path is correct (if included), and try again.

    In Zeile:1 Zeichen:1

    + Uninstall-Module -Name VMware.PowerCLI

    + ~~~~~~~~~~~~~~~~

        + CategoryInfo          : ObjectNotFound: (Uninstall-Module:String) [], CommandNotFoundException

        + FullyQualifiedErrorId : CommandNotFoundException

    )



  • 6.  RE: PowerCLI Version

    Posted Apr 17, 2018 02:39 PM

    Ok, and which PowerShell version are you running?

    What is in $PSVersionTable



  • 7.  RE: PowerCLI Version

    Posted Apr 17, 2018 02:44 PM

    Name                           Value

    ----                           -----

    PSVersion                      5.1.16299.251

    PSEdition                      Desktop

    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}

    BuildVersion                   10.0.16299.251

    CLRVersion                     4.0.30319.42000

    WSManStackVersion              3.0

    PSRemotingProtocolVersion      2.3

    SerializationVersion           1.1.0.1



  • 8.  RE: PowerCLI Version

    Posted Apr 17, 2018 02:55 PM

    Ok, then you should be set.

    Can you run, from a promt with elevated permissions, the following

    Install-Module -Name VMware.PowerCLI

    and what you get on screen?



  • 9.  RE: PowerCLI Version

    Posted Apr 17, 2018 03:02 PM

    "The command "Install-Module" is either misspelled or could not be found " Command Prompt started as Administrator. :smileysad:

    I've realized another thing, when I type " Get-PowerCLIVersion " as Administrator I get the same Error which I got by install,update and delete. May that mean anything?



  • 10.  RE: PowerCLI Version

    Posted Apr 17, 2018 04:24 PM

    That means you are missing the PackageManagement module.

    Do a

    Install-Module -Name PackageManagement



  • 11.  RE: PowerCLI Version

    Posted Apr 18, 2018 08:03 AM

    unfortunately same error neither when I run Powershell as admin or not!
    "install-Module" is not found.



  • 12.  RE: PowerCLI Version

    Posted Apr 18, 2018 09:21 AM

    Does this install Packagemanagement?

    Install-Package -Name Packagemanagement -Verbose



  • 13.  RE: PowerCLI Version

    Posted Apr 18, 2018 10:10 AM

    same error too.
    it does not install anything since it does not recognize what install-Module/Package is.

    ERROR:

    Uninstall Modules: The naming "Uninstall Module" was not named as a cmdlet, a function, a Script file or an executable program detected. Check the spelling of the name, or whether the path is correct (if included), and try again.



  • 14.  RE: PowerCLI Version

    Posted Apr 18, 2018 10:43 AM

    Your system really seems to be messed up.

    Can you uninstall/install WMF 5.1?

    And make sure you install the correct WMF 5.1 file for your platform.



  • 15.  RE: PowerCLI Version

    Posted Apr 18, 2018 02:52 PM

    I have Windows 10 ? It is not supported



  • 16.  RE: PowerCLI Version

    Posted Apr 18, 2018 04:21 PM

    Normally Windows 10 comes with PowerShell 5.0.

    If you applied all the Windows 10 patches and updates, then you should be having PowerShell 5.1.

    Is that the case, did you apply all Windows 10 patches and updates.

    One more thing you could try, does this work?

    Install-PackageProvider Nuget –force –verbose



  • 17.  RE: PowerCLI Version

    Posted Apr 19, 2018 11:01 AM

    Hi,
    I have solved the problem as follows:
    I've deleted all PowerCLi modules then I've copied the Packagemanagement  module from other computer with USB-Stick to mine. The script :

    install_Module -Name VMware.PowerCLI did reaally work :smileyhappy:
    Thanks for your help
    RegardsTaher