So at one of my companies we lease servers from a large hosting company (we only purchase Dell). When they set them up for us, the default name for the Drac DNS name is the server tag. When using Open Manged Essentials it wasn’t a big deal. However, in Enterprise since it actually connects to DRAC (you have to put the DRAC subnet and password to manage with Enterprise) If you don’t know about Open Managed Enterprise give it a shot! It runs on CentOS and the install is pretty easy to use, you just load up the VHD in VMWare or Hyper-V and roll out. The firmware updates also can be staged to run on reboot, so if you need to do certain fail overs it won’t start until the machine is rebooting. It also utilizes the LifeCycle controller to update the box, which makes it more stable, because I ran into issues running Intel NIC Firmware updates causing blue screens. Anyways, here is the powershell Script, I made to Prep all my servers for Open Manage Enterprise.
This Script will grab all the computers in AD (you can filter it how you want), Check to see if it can run racadm. If it can, it will run the following commands, I will explain what each one does. Each command has the legacy command also, I will keep it in there encase you aren’t running DRAC 7+
- racadm config -g cfgLanNetworking -o cfgDNSRacName $computer;racadm set iDRAC.NIC.DNSRacName $computer Sets Name for DRAC
- racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 1 supersecurepassword;racadm set iDRAC.Users.1.Password supersecurepassword Sets Admin password for index 1 and index 2 which should be root. I had issues with index 1 being root in the past, if anon is not there, so i just kept it there and let it error.
- racadm racreset This just resets DRAC, takes about 10 minutes.
$computers = Get-ADComputer -filter *
foreach($computer in $computers)
{
$cn = $computer.name
$rac = Invoke-Command -ComputerName $cn -scriptblock {racadm getsysinfo} -ErrorAction SilentlyContinue
if($rac)
{
Write-Host "Updating DRAC info for $cn" -ForegroundColor Yellow
Invoke-Command -ComputerName $cn -ScriptBlock {$Computer = hostname; racadm config -g cfgLanNetworking -o cfgDNSRacName $computer;racadm set iDRAC.NIC.DNSRacName $computer}
Invoke-Command -ComputerName $cn -scriptblock {racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 1 supersecurepassword;racadm set iDRAC.Users.1.Password supersecurepassword}
Invoke-Command -ComputerName $cn -scriptblock {racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 supersecurepassword;racadm set iDRAC.Users.2.Password supersecurepassword}
Invoke-Command -ComputerName $cn -scriptblock {racadm racreset}
}
else
{
Write-Host "DRAC is not Available on $CN" -ForegroundColor Red
}
$rac = $null
}