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

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