RDS Session Host issue in Windows 2008 R2

At my work we have over 1500 servers. I cloned one of our citrix boxes and it lost it’s TS licensing. When I opened the session host configuration I got a pop-up saying, “The sessions for this RD Session Host server cannot be retrieved. The remove server does not support running RemoteApp Manager remotely”

rdp

This is a WMI error, the google kept telling me to run winmgmt /salvagerepository at command prompt with administrative privileges should resolve the issue. That didn’t work, the lines below do.

cd c:\Windows\system32\wbem
for /f %%s in (‘dir /b /s *.dll’) do regsvr32 /s %%s
pause
for /f %%s in (‘dir /b *.mof *.mfl’) do mofcomp %%s
pause