VMware Cloud Community
BoxiCredy
Contributor
Contributor

PowerCLI 6 - Implicit remoting from local PowerShell ISE

Hi, I have PowerCLI 6 installed on vCenter server 6 but I want to use PowerCLI locally from my PowerShell or PowerShell ISE by implicitly remoting to vCenter server, similar to using Exchange Management Shell locally by implicitly remoting to Exchange Server. Installing PowerCLI 6 on my laptop is last resource but at the same time big overkill since implicit remoting is all about not having to install anything locally but "consuming" PowerShell modules on server itself - since in PowerCLI 6 we have several PowerShell modules for managing complete vSphere environment there must be some way to use these modules via implicit remoting.

How to achieve this? I would like to put these PowerShell lines into my profile script thus being connected to my vSphere environment as soon as my PowerShell console or ISE is started.

0 Kudos
4 Replies
LucD
Leadership
Leadership

You don't have to install PowerCLI on your vCenter.

In fact I would strongly advise against that.

Install PowerCLI on any station/PC, then do a Connect-VIServer to the vSphere server (vCenter and/or ESXi node) you want to work with.

The only exception would be View PowerCLI, there you need to run the script on one of the View Connection servers.


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

0 Kudos
BoxiCredy
Contributor
Contributor

So logic here is reversed - not using PowerShell modules installed on remote servers but install PowerShell modules (in this case PowerCLI) locally.

0 Kudos
LucD
Leadership
Leadership

I don't see how this means reversed logic.

Think of it more as a client-server application.

You local module gives you access to functionality on a server, in this case a vSphere server.

This, imho, also avoids some security and performance risks you might have, if everyone starts running his scripts on the servers.

An example, you use Get-Stat to retrieve performance data from your vSphere server.

The handling of that data (calculations, sorting, producing reports...) should not happen on your vSphere server.

This way of working minimises the impact on the servers


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

0 Kudos
BoxiCredy
Contributor
Contributor

Since I have lot of experience with PowerShell and managing different technologies, mostly Active Directory and Exchange Server, logic there was to use PowerShell modules/snapins installed automatically on these servers via implicit remoting thus I can manage for instance AD and Exchange Server without installing RSAT and Exchange Management Tools on my laptop. Although difference in working with vCenter server is obvious - PowerCLI is not installed automatically with vCenter server but it has to be installed separately. If it is better to install PowerCLI locally on my laptop than on vCenter server itself I would do that.

0 Kudos