Your company's ad could live here and reach over 50,000 people a month!

Share This Post

Link v_MeteredUser.FullName to a full name from ad

To see the full post https://myitforum.com/forums/How-to-link-v_MeteredUserFullName-to-a-full-name-from-ad-m234899.aspx

select 
  R.Netbios_Name0 as 'Computernavn', 
--  U.displayName0 as 'Bruger', 
  Full_User_Name0,
  MU.FullName as 'Brugernavn', 
  MUS.LastUsage as 'Sidst brugt', 
  MUS.UsageCount + MUS.TSUsageCount  as 'Antal brug', 
  round(MUS.UsageTime/60.0,2) as 'Forbrug (min)' 
 from 
  dbo.v_R_System R
  join dbo.v_MonthlyUsageSummary MUS on R.ResourceID = MUS.ResourceID 
  join dbo.v_MeteredFiles MF on MUS.FileID = MF.MeteredFileID 
  join dbo.v_MeteredUser MU on MUS.MeteredUserID = MU.MeteredUserID 
  join dbo.v_R_User U on U.Unique_User_Name0=MU.FullName 
 where 
  MF.ProductName = @RuleName 
 order by 
  R.Netbios_Name0 
 


Share This Post

Leave a Reply