Change Password on all Hosts in VCenter
Adventures In PowerCLI
by
4y ago
A couple of weeks ago I was having a conversation about security hardening my ESXi hosts and how often passwords are changed and of course it's not as often as it should be. Most admins that deal with passwords know the best practice is to change your passwords at least every 90 days and I was looking for an easy way to do that on multiple hosts without having to touch each one. In my lab environment I currently use the same password for all of my hosts so my thought was to write a PowerCLI script that I could use to change the passwords on all the hosts and keep it the same password on all o ..read more
Visit website
VMWare Tools Upgrade Breaks Script With Invoke-VMScript and Pass-through Credentials
Adventures In PowerCLI
by
4y ago
Recently I upgraded a VCenter test cluster to 6.7 Update 3 and hit an issue with running Invoke-VMScript command. I was working on and made some changes to a VM deployment script that is constantly in development and decided that the updated test cluster would be a great place to test those changes as there were no other VMs on it and I had just matched it as close to production as possible. I ran the script as normal and it completed the basic deployment of the VM fine. Unfortunately during post deployment configuration I got an error with my Invoke-VMScript command that stated "Could not lo ..read more
Visit website
Install Powershell and PowerCLI on Linux
Adventures In PowerCLI
by
4y ago
I have been working on setting up a nested VSphere lab in VMWare Workstation the past few weeks and wanted to have a simple jump box with minimum resources that I could use to test out PowerCLI scripts I have been writing. As I am very familiar with working with Linux operating systems and now that Microsoft supports PowerShell Core on Linux distributions I wanted to see if I could get PowerShell and PowerCLI installed on two Linux test servers (Ubuntu 18.04 LTS and CentOS 7) that I have setup already in the lab. Add the PowerShell Repository To install PowerShell Core I first had to add the ..read more
Visit website
Get ESXI Host HBA WWN
Adventures In PowerCLI
by
4y ago
From time to time I have to send HBA WWN and WWP reports to our Storage Team so they can make sure the right LUNs are mapped to the right hosts. That is can be a really easy task if you have a few servers as you can go into the configuration within the Web Interface for VCenter and get the information needed. If you are in a situation like I usually am though and you have multiple hosts usually in the hundreds to get that information could take quite a while but there are quick and easy PowerCLI commands that can help get that information fast and exported to CSV. This simple script can be use ..read more
Visit website
Copying Large Files Using Copy-VMGuestFile
Adventures In PowerCLI
by
4y ago
Every now and again I run into a situation where I have to copy files to virtual machines that are on an inaccessible network. With PowerCLI this can be handled easily using the Copy-VMGuestFile command. For the most part this works as it should but I have run into issues transferring files close to 1 gigabyte or larger where the operation will timeout and you will receive an error of "The request was aborted: The request was canceled". After some research I found out that the default timeout for web operations in PowerCLI is 300 seconds which does include the Copy-VMGuestFile command.This t ..read more
Visit website
Configure Syslog on Multiple ESXI Hosts in VCenter
Adventures In PowerCLI
by
4y ago
One of the most common configuration changes for monitoring and security purposes within any IT System is sending logs to a central location. I was tasked with making this change across multiple VCenter data centers with multiple ESXI hosts and as usual that is something I did not want to manually do as it is so time consuming. To also make things a little more interesting there were some hosts that were already configured but were not working so I had to write the PowerCLI script to check if it was configured and only restart the appropriate services ..read more
Visit website
Resetting Customization Spec Password after VCenter Upgrade
Adventures In PowerCLI
by
4y ago
Following a recent upgrade from VCenter 6.5 to 6.7 I ran into an issue with Windows VM deployments using Customization Specifications. The deployments kept failing with the error "The VCenter Server is unable to decrypt passwords stored in the customization specification." After some research I found out the this occurs because the encryption keys are updated during the VCenter upgrade and the passwords in the Customization Specs can no longer be decrypted.  Solution ..read more
Visit website

Follow Adventures In PowerCLI on FeedSpot

Continue with Google
Continue with Apple
OR