Thursday, 21 November 2013

Active Directory Health Check script

This handy script can be used to check the health of your active directory.

@echo off
del c:\ADHealth.txt

echo ________________________________ >> c:\ADHealth.txt
echo Domain Controllers In the Domain >> c:\ADHealth.txt
echo ________________________________ >> c:\ADHealth.txt
C:\Windows\System32\DSQUERY Server -o rdn >> c:\ADHealth.txt
echo _________________ >> c:\ADHealth.txt
echo FSMO role holders >> c:\ADHealth.txt
echo _________________ >> c:\ADHealth.txt
C:\Windows\System32\netdom query fsmo >> c:\ADHealth.txt
echo ______________________ >> c:\ADHealth.txt
echo Repadmin - Syncall - e >> c:\ADHealth.txt
echo ______________________ >> c:\ADHealth.txt
C:\Windows\System32\repadmin.exe /syncall /e >> c:\ADHealth.txt
echo ______________________ >> c:\ADHealth.txt
echo Repadmin - Syncall - a >> c:\ADHealth.txt
echo ______________________ >> c:\ADHealth.txt
C:\Windows\System32\repadmin.exe /syncall /A >> c:\ADHealth.txt
echo ______________________ >> c:\ADHealth.txt
echo Repadmin - Syncall - d >> c:\ADHealth.txt
echo ______________________ >> c:\ADHealth.txt
C:\Windows\System32\repadmin.exe /syncall /d >> c:\ADHealth.txt
echo ______________________ >> c:\ADHealth.txt
echo Repadmin - Replsummary >> c:\ADHealth.txt
echo ______________________ >> c:\ADHealth.txt
C:\Windows\System32\repadmin.exe /replsummary * >> c:\ADHealth.txt
echo ______________ >> c:\ADHealth.txt
echo Repadmin - KCC >> c:\ADHealth.txt
echo ______________ >> c:\ADHealth.txt
C:\Windows\System32\repadmin.exe /kcc * >> c:\ADHealth.txt
echo _____________________ >> c:\ADHealth.txt
echo Repadmin - showbackup >> c:\ADHealth.txt
echo _____________________ >> c:\ADHealth.txt
C:\Windows\System32\repadmin.exe /showbackup * >> c:\ADHealth.txt
echo ___________________ >> c:\ADHealth.txt
echo Repadmin - Showrepl >> c:\ADHealth.txt
echo ___________________ >> c:\ADHealth.txt
C:\Windows\System32\repadmin.exe /showrepl *  >> c:\ADHealth.txt
echo ________________ >> c:\ADHealth.txt
echo Repadmin - Queue >> c:\ADHealth.txt
echo ________________ >> c:\ADHealth.txt
C:\Windows\System32\repadmin.exe /queue *  >> c:\ADHealth.txt
echo ______________________ >> c:\ADHealth.txt
echo Repadmin - Bridgeheads >> c:\ADHealth.txt
echo ______________________ >> c:\ADHealth.txt
C:\Windows\System32\repadmin.exe /bridgeheads * /verbose >> c:\ADHealth.txt
echo _______________ >> c:\ADHealth.txt
echo Repadmin - ISTG >> c:\ADHealth.txt
echo _______________ >> c:\ADHealth.txt
C:\Windows\System32\repadmin.exe /istg * /verbose >> c:\ADHealth.txt
echo _______________________ >> c:\ADHealth.txt
echo Repadmin - Showoutcalls >> c:\ADHealth.txt
echo _______________________ >> c:\ADHealth.txt
C:\Windows\System32\repadmin.exe /showoutcalls * >> c:\ADHealth.txt
echo ____________________ >> c:\ADHealth.txt
echo Repadmin - Failcache >> c:\ADHealth.txt
echo ____________________ >> c:\ADHealth.txt
C:\Windows\System32\repadmin.exe /failcache * >> c:\ADHealth.txt
echo ____________________ >> c:\ADHealth.txt
echo Repadmin - Showtrust >> c:\ADHealth.txt
echo ____________________ >> c:\ADHealth.txt
C:\Windows\System32\repadmin.exe /showtrust * >> c:\ADHealth.txt
echo _______________ >> c:\ADHealth.txt
echo Repadmin - Bind >> c:\ADHealth.txt
echo _______________ >> c:\ADHealth.txt
C:\Windows\System32\repadmin.exe /bind * >> c:\ADHealth.txt
echo ______ >> c:\ADHealth.txt
echo Dcdiag >> c:\ADHealth.txt
echo ______ >> c:\ADHealth.txt
C:\Windows\System32\dcdiag /c /e /v >> c:\ADHealth.txt
start c:\ADHealth.txt

Tuesday, 19 November 2013

VMware Standalone Converter 5.5 fails conversion with vim.fault.NonAuthenitcated

During an overnight conversion of a large virtual machine from an old ESX 3.0.2 server to a new ESXi 5.5 server. The conversion failed at 19% with error vim.fault.NonAuthenitcated


After some googling, not much showed up. Took a flyer and retired the job, it completed!!

If at first you don't succeed, try , try and try again. :)

Thursday, 24 October 2013

Adobe flash on Windows server 2012

To get flash to work on Windows server 2012 you need to enable the desktop experience. The instruction on the Adobe website discuss disabling ActiveX filtering, but this is for Windows 8.

import-module ServerManager
Add-WindowsFeature -name Desktop-Experience,qWave ` -IncludeAllSubFeature -IncludeManagementTools

Thursday, 3 October 2013

Resetting the VMware ESXi trial period

Sometimes I am asked to build a vSphere environment on a trial license from VMware. By default this is 60 days. However after building the environment, updating and testing the trial period will have dropped a number of days. The customer rightly pointed out that this has reduced their trail of the product.

You can use this command at the ESXi shell to reset the trail period back to 60 days.

rm -r /etc/vmware/license.cfg
cp /etc/vmware/.#license.cfg /etc/vmware/license.cfg
/etc/init.d/vpxa restart

Tuesday, 10 September 2013

Check Hyper-V replica status across the cluster

If you would like to check the replication status of all the VMs across your cluster you can use this PwerShell command.

get-clusternode | ForEach-Object  {Invoke-command -computername $_.name -scriptblock {get-VMReplication}} | ft name, State, Health, PrimaryServer

Tuesday, 23 July 2013

Dell M1000e IOM firmware fails from CMC GUI

When trying to update the IOM firmware from the CMC GUI you see the error below. I tried pulling the standby CMC and vice-versa but this did not work either.



Fix:

Connect to the CMC management IP address via putty over SSH, and issue this command.

racadm fwupdate -s -m all

This should list all the modules that require a firmware update.

racadm fwupdate -u -m iominf-1

The command above will update the IOM is A1, so you will need to repeat this if you have more IOMs, changing the last digit. Be warned this command will reboot the switch!





Friday, 19 July 2013

Updating firmware on Force10 MXL Blade IOM

Attach to the switch via a console cable, or the CMC backdoor. Start TFTP on your PC with the firmware in the TFTP root.

Show system brief or show os-version
Conf
Int management 0/0
ip address 1.2.3.4 /24
no shutdown
exit
upgrade system tftp://1.2.3.1/FTOS-XL-8.3.16.4.bin A:
wr
reload
show os-version