vSphere Inventory Remove Script

Here is a quick script to remove vm's from the vSphere Inventory.

[sourcecode language=”css”]

#############################################
# Script Name: RemoveVMs.ps1 #
# Author Name: Carlos Vargas #
# Version : 1.0 #
# Contact : cavarpe.wordpress.com #
#############################################

# Requirements
# VMware PowerCLI 4.1
#Import VM information
$VMs = Import-Csv .vminformation.csv

#Loop for array of VM's
foreach ($vm in $VMs )
{
Remove-vm -VM $vm.name -confirm:$false
}
# Versions
# 1.0 New Script
[/sourcecode]

Subscribe For Latest Updates

Sign up for best of digital marketing, livestream and technology opinions on what matters to you.

Invalid email address
We promise not to spam you. You can unsubscribe at any time.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: