Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

Blog posts : "Powercli"

Upgrade vCenter Server Appliance (VCSA) with VMware PowerCLI

I had bunch of vCenter Server appliance (VCSA) to update/upgrade. Although the upgrade process using vCenter Server VAMI portal (5480) is fairly very simple and easy as shown in Patching update VMware vCenter Server Appliance from a zipped update bundle Web server. But I wanted it to get it automat…

Read more

VMware PowerCLI Clone VM from template with customization specs in vCenter

This is a second alternative script to VMware PowerCLI Clone and Deploy VM from template in vCenter. In earlier article I did customization of newly cloned Virtual Machine using Windows PowerShell commands which I executed using Invoke-VMscript. Here in this script I used inbuilt customization pro…

Read more

VMware PowerCLI Clone and Deploy VM from template in vCenter

This VMware PowerCLI helps cloning and deploying Virtual Machine from template in vCenter Server. I had to write OS customization for Windows 2019 server because due to some reason native customization profile was failing. Here in this script there are 3 files in the script package, first file is 

Read more

PowerCLI enable or disable WBEM service on VMware ESXi server

The VMware Host Hardware (WBEM) sensor monitors information about the hardware of an ESXi server using Web-based Enterprise Management (WBEM). This script will disable and enable WBEM service using PowerCLI.

Download this Set-WbemServiceEsxi.ps1 here or it is also available on github.com/janviu…

Read more

Vmware PowerCLI Import-Module message VMware Customer Experience Improvement Program (CEIP)

When you run the command to Import-Module VMware.PowerCLI on Powershell, You might have received the below warning message regarding VMware CEIP (Customer Experience Improvement Program). 

VMware's Customer Experience Improvement Program (CEIP) collects technical information from participating …

Read more

PowerCLi Connect-VIServer could not connect using the requested protocol

There is a common issue you might have faced while connecting to either vCenter server or Esxi Server using Vmware PowerCLI.

Connect-VIserver $esxiServer -User $user -Password $password
Connect-VIServer could not connect using the requested protocol. 
Additional Information: The remote server…

Read more

PowerCLI The SSL connection could not be established see inner exception

Recently while working with Vmware PowerCLI on one of my new laptop, when connecting to esxi server and vCenter server with Connect-VIserver command, I was receiving below error.

Connect-VIServer $esxiserver -User $user -Password $password
Connect-VIServer The SSL connection could not be estab…

Read more

VMware PowerCLI Find vCenter server name of any inventory object

In my daily use of Vmware PowerCLI scripts while pulling inventory from vCenter Server, I always include vCenter Center name in the inventory. For example if I am fetching list of Clusters or VMs with complete information it should include a property name of vCenter Server, where the object belongs.…

Read more

PowerCLI Gather complete Virtual Distributed Switch (VDS) information from VMware vCenter

While working at different clients on their VMware infrastructure, I always gather complete inventory of a vCenter infrastructure first before doing any changes or designing a solution. This way I get to know very quick about the architecture. Here is my script which fetches all VDS (Virtual Distrib…

Read more

PowerCLI Connect-VIServer Error: Invalid server certificate. Use Set-PowerCLIConfiguration to set the value for the InvalidCertificateAction

While working with VMware PowerCLI module I was receiving below error, when connecting to vCenter or ESXi server. The system where I was working on, PowerCLI was installed for first time and I was connecting to vCenter/ESXi for first time from the system. This issue occurs due to SSL certificate ins…

Read more

Create a custom TCPIP stack on ESXi server - VMware PowerCLI GUI

While working with my VMware team we had to audit and create or delete TCP/IP network stack, Here on the ESXi server under Networking >> TCP/IP Configuration you cannot create new custom stack using vSphere client. I was able to automate almost all infrastructure using PowerCLI scripts, but few…

Read more

VMware PowerCLI esxcli namespace command elements empty no output

This article is another part and related to this VMware PowerCLI Connect-VIServer Object reference not set to an instance of an object. The resolution used in the earlier blog is applied here in this article.

The problem description is, I connected to my vCenter server after I tried to connect…

Read more

VMware PowerCLI Connect-VIServer Object reference not set to an instance of an object

While connecting to ESXi server with VMware PowerCLI from one of my server I was keep receiving below error. I wasn't able to connect to ESXi server directly from PowerCLI module. 

@SERVER01 ~ Connect-VIServer ironman.vcloud-lab.com
Connect-VIServer :  Object reference not set to an instanc…

Read more

Powershell GUI VMware ESXi custom patch bundle builder

Every time VMware releases ESXi patches, and I need to patch them on different projects with few modifications to patch bundle, by trimming down few driver VIBs packages or add third party driver vibs zip files packages. I do everything with PowerCLI commands. But as I wanted my colleage to perform …

Read more

VMware PowerCLI The remote server returned an error: (407) Proxy Authentication Required

"The remote server returned an error: (407) Proxy Authentication" - This is another issue I faced when working with VMware PowerCLI, Although I had already resolved another error in VMware PowerCLI Connect-VIserver Could not connect using the requested protocol, Only the difference was it was not …

Read more

PowerCLI oneliner get the list of users and groups from vCenter SSO

I was doing the audit of VMware vSphere vCenter servers to know the users and groups list on the vsphere.local SSO domain (If any custom new user or groups created), Below simple one-liner script helps to fetch the list of groups from vsphere.local single sign on domain. 

Import-Module VMwa…

Read more

PowerCLI create, modify and assign tag and tagcategory

This script is written using VMware Powercli module and its purpose is as similar as earlier written script Powershell vCenter server Rest API create and assign tag and tagcategory for creating and modifying Tag and TagCategory, only the difference is earlier script is written using vSphere API t…

Read more

PowerCLI Add a SCSI Controller to a Virtual Machine

My requirement was to write and automate adding a new virtual SCSI controller to virtual machines using PowerCLI. For this task there is cmdlet is already available New-ScsiController. But the problem with command is, standalone virtual SCSI controller cannot be added. It has to add new or existing…

Read more

Add a VMFS datastore using VMware PowerCLI

This article's completely focus is on VMware PowerCLI command line to add or create new VMFS datastore, You can check Create a VMFS Datastore in the vSphere Client how The same task is performed using vSphere Client (HTML5). To start first Import Vmware.PowerCLI module on to PowerShell and log in t…

Read more

PowerCLI Get-VMhost The operation on computer failed The WinRM client cannot process the request

I frequently get error winrm client cannot process the request while running few VMware PowerCLI commands for example: Get-VM, Get-VMhost etc. The complete error is highlighted as below in the Red, This generally happens due to duplicate cmdlet name in the another module.

Microsoft Powershell Module PowerCLI vmware.Powercli vmware vsphere esxi connect-viserver import-module get-vmhost winrm hyper-v module vcenter server vcsa vsphere client visual studio code.png

Import-Module VMw…

Read more

20 blog posts

Blog Search

Page Views

11241259

Follow me on Blogarama