VMware Cloud Community
celma972
Contributor
Contributor
Jump to solution

POWERCLI 6.5.1 and powershell 4.0

Dear all

I have installed powercli 6.5.1  in powershell 4.0 console I have followed the instructions from Kyle Ruddy blogsKyle Ruddy, Author at VMware PowerCLI Blog - VMware Blogs

But when I run connect-VIServer serv01

I got the message that connect-VIserver is not recognized as an applet

Any idea hiw can can fix it?

Thks

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

No, that vidoe from Kyle is the one you should follow (starting around the 03:52 mark).

But I don't understand how you got the C:\Users\zz_celmajj\Documents\WindowsPowerShell\Modules\PowerCLI\Modules folder?

All PowerCLI modules should be in C:\Users\zz_celmajj\Documents\WindowsPowerShell\Modules provided you installed for CurrentUser.

Perhaps remove everything, and install from scratch (following Kyle's video)


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
8 Replies
LucD
Leadership
Leadership
Jump to solution

Did you load the PowerCLI modules?

In PowerShell v4 there is no autoload.

Do a

Get-Module -Name PowerCLI* -ListAvailable | Import-Module

If that doesn't fix the issue, check the folder where the PowerCLI modules are located.

Then check the content of the variable $env:PSModulePath, is the PowerCLI folder in there?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
celma972
Contributor
Contributor
Jump to solution

@LucD​

I check the content of the variable $env:PSModulePath. I got this lines :

PS C:\Users\zz_celmajj> $env:PSmodulepath

C:\Users\zz_celmajj\Documents\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules\;C:\Program

Files\WindowsPowerShell\Modules\

So, there is no PowerCLI folder

How can I fix that?

Thks

JJC

0 Kudos
LucD
Leadership
Leadership
Jump to solution

But where are the PowerCLI modules installed?

Do a

Get-Module -Name VMware* -ListAvailable


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
celma972
Contributor
Contributor
Jump to solution

@LucD

PS C:\Users\zz_celmajj> Get-Module -Name VMware* -ListAvailable

    Répertoire : C:\Users\zz_celmajj\Documents\WindowsPowerShell\Modules\PowerCLI\Modules

ModuleType Name                                ExportedCommands

---------- ----                                ----------------

Binary     VMware.DeployAutomation

Binary     VMware.ImageBuilder

    Répertoire : C:\Users\zz_celmajj\Documents\WindowsPowerShell\Modules

ModuleType Name                                ExportedCommands

---------- ----                                ----------------

Manifest   VMware.PowerCLI

    Répertoire : C:\Users\zz_celmajj\Documents\WindowsPowerShell\Modules\PowerCLI\Modules

ModuleType Name                                ExportedCommands

---------- ----                                ----------------

Binary     VMware.VimAutomation.Cis.Core

Binary     VMware.VimAutomation.Cloud

Manifest   VMware.VimAutomation.Common

Binary     VMware.VimAutomation.Core           HookGetViewAutoCompleter

Binary     VMware.VimAutomation.HA

Binary     VMware.VimAutomation.HorizonView

Binary     VMware.VimAutomation.License

Binary     VMware.VimAutomation.PCloud

Manifest   VMware.VimAutomation.Sdk            Get-PSVersion

    Répertoire : C:\Users\zz_celmajj\Documents\WindowsPowerShell\Modules

ModuleType Name                                ExportedCommands

---------- ----                                ----------------

Binary     VMware.VimAutomation.Srm            {Connect-SrmServer, Disconnect-SrmServer}

    Répertoire : C:\Users\zz_celmajj\Documents\WindowsPowerShell\Modules\PowerCLI\Modules

ModuleType Name                                ExportedCommands

---------- ----                                ----------------

Binary     VMware.VimAutomation.Storage

    Répertoire : C:\Users\zz_celmajj\Documents\WindowsPowerShell\Modules

ModuleType Name                                ExportedCommands

---------- ----                                ----------------

Script     VMware.VimAutomation.StorageUtility Update-VmfsDatastore

    Répertoire : C:\Users\zz_celmajj\Documents\WindowsPowerShell\Modules\PowerCLI\Modules

ModuleType Name                                ExportedCommands

---------- ----                                ----------------

Binary     VMware.VimAutomation.Vds

Binary     VMware.VimAutomation.vROps

Binary     VMware.VumAutomation

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Ok, it looks as if the PowerrCLI modules are installed for the Scope CurrentUser.

But I wonder how you got the folder C:\Users\zz_celmajj\Documents\WindowsPowerShell\Modules\PowerCLI\Modules?

Did you create that one manually, or is the result from a folder copy?

I would suggest to remove them all (first check fi there is anything in Programs/Features).

Then install the modules again. Follow the instructions in PowerCLI 6.5.1 Installation Walkthrough, there are instruction for OS v3 and v4.

If you install in the "standard" folders (with Scope CurrentUser or AllUser), there will be no need to add a folder to the $env:PSModulePath variable


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
celma972
Contributor
Contributor
Jump to solution

No I didn't create the folder manually. I followed the instructions from Kyle Ruddy's video.

Do, I have to follow your suggestion anyway?

Thks

JJC

0 Kudos
LucD
Leadership
Leadership
Jump to solution

No, that vidoe from Kyle is the one you should follow (starting around the 03:52 mark).

But I don't understand how you got the C:\Users\zz_celmajj\Documents\WindowsPowerShell\Modules\PowerCLI\Modules folder?

All PowerCLI modules should be in C:\Users\zz_celmajj\Documents\WindowsPowerShell\Modules provided you installed for CurrentUser.

Perhaps remove everything, and install from scratch (following Kyle's video)


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
celma972
Contributor
Contributor
Jump to solution

@LucD

Great thanks.

By deleting all instances of POWERCLI folder and registry entries

Re-installing by following K. Ruddy video, it's work on Microsoft Powershell and Powershell Studio 2017

JJC

0 Kudos