PowerShell to Configure iSCSI and MPIO

At work we have started to make a push to get as many servers off of RDM (Raw Device Mapping) drives in the virtual environment as we can. We use the RDM drives with MSCS (Microsoft Server Cluster Service) with SQL, but we do have a few application failover cluster as well. With this change we have an influx of iSCSI (Internet Small Computer Systems Interface) drive configurations along with  MPIO (Multipath I/O) configured.  … 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