Monday, October 7, 2013

SCVMM 2012 SP1 Hyper-V host lowercase to uppercase

So for the slightly OCD folks out there who have installed SCVMM, added the hosts to be managed and noticed that some names are in lower case and some are in uppercase. Functionally not a big deal but doesn't look consistent.

I came across this great little tid bit by Larry Rayl: http://blogs.catapultsystems.com/lrayl/archive/2013/05/14/tips-amp-tricks-for-sc-2012-sp1-vmm-fix-for-the-upper-and-lower-case-host-listings.aspx

Simply follow the below steps:

1. Backup the SCVMM Database (SCVMM console or in SQL Management Studio). I need to stress this is a must for any DB level changes required for SCVMM!

2. Log on to SQL Management Studio and apply the following script:

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)



3. After running the script, restart “System Center Virtual Machine Manager Agent Service” on the VMM Server.

4. After this all hosts will appear in uppercase.

So all those OCD folks out there...can rest at ease!
Thanks Larry!

No comments:

Post a Comment