Issues with PowerShell Modules and Duplicate Cmdlets

At the end of the day I always take my laptop with me as I never know when I’ll get a call about server issues.  So my PowerShell sessions remain open all of the time, with all of the modules loaded.  Granted I do save my scripts that I work on frequently, and I had a problem before losing a few scripts without having a recent save.  … Continue reading

Using PowerCli to gather NIC settings

We had some changes recently in the environment, and the old DNS and WINS servers were decommissioned.  So I was tasked with getting all of the NIC settings of the virtual machines so we can see how many were using the old settings.  So I started with a simple WMI call to gather the settings from the NICs.… Continue reading

Setting up VMware Tools Shared Product Locker with PowerShell

With the changes to how VMware Tools will be released, we finally decided to setup Product Locker. These changes were released in September 2015 VMware decided that the tools would be no longer depended on vSphere releases or ESXi builds.

Download VMware Tools here

One of our other VMware engineers found a script (link here) that could do this task, but it was seemed like it was wrote for a smaller environment than what we work with.  … Continue reading

Get free space of all Datastores with PowerCLI

Before I spin up a new VM, I like to check which datastore has the most free space.  This can be completed with a PowerCLI command.

Get-Datastore

The problem with this, it it is too broad. This gets all of the datastores in vSphere, they are not in any sort of order, and it is also getting datastores that i wouldn’t normal use to put a VM on.  … Continue reading

PowerCli to get list of unused RDMs on VM Cluster – Updated

After finishing the last post and starting to use it after limited testing I found that my script wasn’t filtering out the Datastores as expected.  This information was presented to me via our storage team.  So I have went back to the Integrated Scripting Environment (ISE) to resolved my issues.

$Cluster = "Cluster name here"
#This Line gets all of the LUNs that are connected to the first host in the cluster.
Continue reading

PowerCli to get list of unused RDMs on VM Cluster

This page has been updated. Please visit http://notesofascripter.com/?p=23 for the updated script.

Since my last post was about RDMs, lets continue the discusion.  In my work environment we have been consolidating our VMware platform.
So we have been moving VMs with RDMs attached from one cluster to another.  So its been a messy process, and we haven’t had the time to
clean up behind ourselves. … Continue reading