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

PowerCLI to get information about RDM connected to VM.

In my work environment when we use MS SQL, so we have to build failover clusters.  This means the use of RDM (Raw Device Mappings) LUNs.  So you have to connect the RDM LUNs to the first system and them connected them to the second system using the disk file names.  This is not a big deal, but it is nice to speed this process of mapping the drive on the second system, and cut and paste is your friend.… Continue reading

How to verify windows features match with PowerShell.

In the last couple of weeks I had to configure several servers that needed to be the same as in a lower environment.  So instead of just guessing what i installed several months ago, I wrote a script to do it for me.

$OriginalServer = "Server_Name"

#Gets the windows features installed on the original server and stores it as $ComputerA_WindowsFeatures
$ComputerA_WindowsFeatures = (Get-WindowsFeature -ComputerName $OriginalServer | Where {$_.Installed -eq "True"}).Name

#Gets the windows features installed on the system you are currently logon that needs to match the original server and stores it as $ComputerB_WindowsFeatures
$ComputerB_WindowsFeatures = (Get-WindowsFeature | Where {$_.Installed -eq "True"}).Name

#Compares the 2 variables and stores the differences as $difference
$difference = (Compare-Object -ReferenceObject $ComputerA_WindowsFeatures -DifferenceObject $ComputerB_WindowsFeatures).inputobject

#Installed all of the features that are stored in the $difference variable.
Continue reading

How to use PowerCli to update the NTP Servers on all VMHosts at once.

We have been doing a massive consolidation at the office the last few months. With this consolidation we have been getting VMHosts that haven’t been configured with the new standard configuration, so we have to fix the issues. The biggest issue is the NTP servers not being set the same servers. So how to you fix it, script it.… Continue reading