Tips and Tricks for SC 2012 SP1 VMM – Fix for the Upper and Lower Case host listings

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!)

clip_image002 

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!

clip_image002[4] 

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 Smile

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!

11 Comments

  1. Kevin Neal September 24, 2013
  2. Chris C October 8, 2013
  3. Peter Van Geem May 16, 2014
  4. Peter Van Geem May 20, 2014
  5. M June 4, 2014
  6. M June 9, 2014
  7. Kevin Neal June 16, 2014
  8. Aaron Krueger August 20, 2014
  9. Erik October 20, 2014
  10. Abhishek Shivhare December 2, 2014
  11. Torben January 22, 2015

Leave a Reply