VM Service Report v1.0
This Script is to determine what services are running on what vm's in a VI organization This is very handy when you have many vm's running all types of services - and can point out a rogue service you...
View ArticleVirtual Machine Failover between DataCenters
#This is a script to failover multiple groups of virtual machines. This is for a Virtual Infrastructure based in two datacenters. Each datacenter has a SAN with a series of LUNs that are mirrored...
View Articleclonevdi
This script and config file is used in our environment to clone a base image on a netapp 3020 cluster with NFS and a-sis. Cloning is done parallel on all systems mentiond in the configuration file....
View ArticleRescan HBAs on all hosts in a cluster
Need to add or expand a LUN to all the hosts of a cluster? This simple script can save you a lot of time if you are using the GUI to do a rescan on a largish cluster. This script can easily be adapted...
View ArticleFolder Name Mismatch
Isn’t it annoying when you are looking for a VM on your datastore and you cant find it because the folder name is not the same as the VM,use the below script and you will never have that problem...
View ArticleService status and email if down (as well as try to start it)
Here is a script I sorta came up with that checks common vmware services and then emails if any one of them aren't running (and trys to start them)(since our vsphere upgrade bombed a few times thanks...
View ArticleConfigure Switching for ESX host based on .CSV
A couple of weeks ago I was in need to configure several new ESX servers with multiple NICs, vSwitches, and VLANs. Since I'm not one to do the same thing over and over again I turned to scripting. To...
View ArticleJob-Rescan-ALL-HBA
This program will rescan all the HBA's in your vm enviroment, and instead of doing it one at a time, it creates a seperate job for each ESX host. Thus multithreading the rescan. For ESX 3.5 this is...
View ArticlevCheck (Daily Report) V3
Daily Report does what it says on the tin, it runs as a scheduled task before you get into the office to present you with key information about your infrastructure in a nice easily readable format....
View ArticleUsing PowerCLI to migrate VMs in a DRS enabled Cluster
We are running ESX 4.0 on HP DL380G6 servers. I created a cluster with three hosts and enabled HA and DRS. I can use the VSphere GUI to tell a host to enter Maintenance Mode, and since it is in a...
View Articlecreate a. bat file to connect to vCenter
Hello, I need to create one .bat to open a connection automatically to vCenter, I created a .bat PowerCLI calling and opens well but I did not connect, you copy the contents: C: \ Windows \ System32 \...
View ArticleNeed a PS script to delete/remove a VM
Hello, Is there any sample powershell script to perform something simple like removing a VW? Given the datacenter name and the vm name, is there such a script someplace I could use to perform that?...
View ArticlePowerCLI script to clone and customize Linux guest OS
http://honglus.blogspot.com/2010/10/vsphere-powercli-script-to-clone-and.html The script can clone Linux and assign ip addresses to multiple adapters. There are 2 scriptsdiscover-info.ps1 Discovery...
View ArticleNumber of vCPUs in a cluster
Inspired by Jason Boche’s article: http://www.boche.net/blog/index.php/2009/08/18/hidden-virtual-cpu-limit-restriction-in-esx-3-5/ and also William Lam’s Perl Script...
View ArticleFast Snapshot Report
We needed a way to identify all machines that had snapshots. Get-snapshot was far too slow, so I wrote this script to quickly generate a report of all VMs with snapshots more than 2 weeks old. This...
View ArticlevCenter Statistics Level Audit Script
The following script was written to solve a problem in our environment where we had a vCenter server that had it’s Statistics Level set much too high. While the high granularity is helpful for...
View ArticleDelete folder in datastore
Hi all, I've been trying forever to use the "$fileMgr.DeleteDatastoreFile_Task" command in PowerCLI.I create clones for backup, and after cloning I remove them from the inventory. So now I want to...
View ArticleRun Script on host ESX and copy results back to server
I am new to using PowerCLI and hoping that this will save me time from going to 26 ESX host servers and doing it manually. I am looking for a command to run an audit.sh script that is copied out to the...
View ArticleGet Datastore details by selected DataCenter in a VC
This script will connect to multiple VCs > List Datacenters > Will ask to enter DC name from which you wan to colleact datastore details.
View ArticleI Need help, How to configure IP addresses of VMs with PowerCLI
Hello everyone, I open this topic because i really need your help. I've written a script that can automatically create 10 virtual machines on my ESX Server.I run the script with PowerCLI. I want now by...
View ArticleHelp with Customization Specification
Good Day, I am trying to create a script that will import a Customization Specification (Custom Spec) that was created in a different vCenter. As we know the Password for the local administrator...
View ArticleHelp with ESXi 5.0U2 hosts and PowerCLI / CLI
Can I use PowerCLI U1 and VMware CLI 5.0U1 on hosts with U2?? I am having issues.
View ArticleSome PowerCLI cmdlet does not work with Powershell Remoting
Hi All, I am trying to run the PowerCLI in a remote powershell session. Connecting to vSphere works just fine however some of the cmdlets just hangs. I checked with Fiddler and it appears that the...
View ArticleAutomated daily snapshots
I looked around for something to create and manage daily snapshots and didn't find anything, so I wrote this. Thought I'd share in case others might use it.cd 'C:\Program Files...
View ArticleNeed help import OVF using DeploymentOption
Hi there,I am using PowerCLI PowerShell script to automate the import of OVFs.My problem is that my OVF has DeploymentOption section with 2 configurations, where each configuration points to a...
View ArticleQuestion about Set-VMGuestNetworkinterface and Get-VMGuestNetworkInterface
Hi all, I'm trying to write powercli scripts to mass change VM IP addresses and hostnames. The hostnames I have no clue how to tackle, but I figured I could use Set-VMGuestNetworkInterface and...
View ArticleNeed a Script for ISCSI Multipathing please
Hi I was hoping someone could please point me in the direction of a PowerCLI Script that will override the ISCSI vSwitch configuration so that each VMkernel port maps to only one active adapter (and...
View ArticleInvoke-VMscript output selection
Hi everyone, I have some trouble to get a scriptout from an invoke-vmscript command. first of all, i'm running powercli x32 5.1R2 on vshpere 5 (ESXi 5). I'm running a script to display the license...
View ArticlePowershell script help - creating a VM inventory
Hi - I need to create a very specific output for VM inventory purposes.I have, by hook and by crook, coppled together a script that works well for my needs, except for one issue I cannot resolve.My...
View ArticleQuery: VMparameter script working on 1 vcenter but not on another vCenter
Hi, I have created a script to retrieve VM paramters "VM Name, DNS Name, Creation Date, Power State ,OS Full Name ,VM Hardware Version , Tools Version , VM Tools Status , CPU HOT Enabled, Memory Hot...
View ArticleChecking for configured subnets
My company keeps a separate database of avaible IP's from which VMs are to utilize. The problem is that there is a delay between what subnets are contained in the database and what has been actually...
View ArticleNTP, PowerShell, It's about time.
There's no doubt that time is critically important in a computingenvironment. Given this sensitivity, and the recent recognition that wehad rogue hosts improperly configured, I decided to crank out a...
View Articlecopy-datastoreitem
Hi Guys, I am trying to upload few folders to a datastore. It fails with below message. Upload of file failed. Error message: The remote server returned an error: (400) Bad Request. I tried creating a...
View ArticleChange Storage Profile on Medias after vCloud Director Upgrade to 5.1
#Here is a script example to change the *any Profile to the correct one, after an Upgrade to vCloud Director 5.1$medias = get-media$i=1$total = $medias.countforeach($media in $medias){$storageprofile =...
View ArticleVMware Healthcheck script
VMware Healtcheck scriptIntroduction: Healthcheck is a Powershell script that reports information like snapshots, VMware tools version, datastore space, CDROM and/or floppy drives connected, VM details...
View ArticleA script that returns the date a VM was created
Hello All, I am in the process of writing a short script that returns the a VM name, the creator's username, and the date/time that the VM was created. The script then outputs the results to a CSV....
View ArticleNeed a script to change tools locker setting
have this as the working line but i want to run this per cluster, need some help from the gurus out there Get-AdvancedSetting -Entity 'hostname' -Name UserVars.ProductLokerLocation |...
View ArticleVM Inventory from Multiple VCs
Hello, You can pull the VMs inventory using PowerCLI script from the multiple VCs. It will give you VCName, VMName and their respective information in Excel file.
View ArticleSnapshot Email Reminder
Fed up of chasing those people who constantly create snapshots and leave them hanging around for weeks or even months on end ? You no longer have to do the chasing, just use the following script to...
View ArticleGet DataStore Usage Report on email.
Hello Friend, Find the attached script to Get DataStore Usage Report on email.This will give you HTML format report on your email and with RED mark if any datastore is running with less then 20% of...
View Article