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