Hello again to all my fans around the world! Here is a quick and easy fix for your VMM 2012 installs that show upper and lower case hosts.
I get this question all the time and though I would dig into it a little bit. At first I though it was a DNS thing that was going on but never did get a handle on it going that route. Still not sure if its in the DB design or what but here is a sql script you can run that will correct all of those VMM installs out there;
This is what my host looked like before I ran the script in my lab: (ya I know, I don’t have a mixture of upper and lower case host names; doesn’t matter, you do!)
Here is the script to run in SQL to make them all upper case:
_________________________________
SELECT [ComputerName], UPPER(LEFT([ComputerName], CHARINDEX(‘.’, [ComputerName], 1) -1)) +
RIGHT([ComputerName], LEN([ComputerName]) – CHARINDEX(‘.’, [ComputerName], 1) + 1)
FROM [VirtualManagerDB].[dbo].[tbl_ADHC_Host]
UPDATE [VirtualManagerDB].[dbo].[tbl_ADHC_Host]
SET [ComputerName] = UPPER(LEFT([ComputerName], CHARINDEX(‘.’, [ComputerName], 1) -1)) +
RIGHT([ComputerName], LEN([ComputerName]) – CHARINDEX(‘.’, [ComputerName], 1) + 1)
________________________________
After running the script, restart “System Center Virtual Machine Manager Agent Service” on the VMM Server.
Afterwards, all your hosts will show up in caps!
This script will work for any VMM environment and has been tested multiple times in other environments. It really doesn’t matter if you domain is foo.com, foo.local or foosball.com; it works. But I am adding a disclaimer in here to make sure you create a backup of of he DB before running the script.
I do what to put out a special thank you to DBA Jimmy Johnson over at BenefitMall for helping me put this script together. Thanks Jimmy! I still owe you lunch on for this one
Well, that’s all there is to it! Happy virtualizing with VMM everyone! Hope this clears up those nightmares you have been having looking mixed character host names in your VMM console!