→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎03-05-2019 12:58 PM
Select Top 1000000 'user.png' As Icon,
Case
When tblExchangeUser.DisplayName Is Null Or
tblExchangeUser.DisplayName = '' Then tblExchangeUser.Name
Else tblExchangeUser.DisplayName
End As DisplayName,
tblExchangeUser.UserPrincipalName,
tblADusers.Username,
tblADusers.Userdomain,
Case
When tblExchangeUser.AccountDisabled = 1 Then Convert(bit,0)
Else Convert(bit,1)
End As Enabled,
tblExchangeServer.AssetId As ServerAssetId,
tblExchangeServer.Name As ExchangeServer
From tblExchangeUser
Left Outer Join tblADusers On
tblADusers.UPN = tblExchangeUser.UserPrincipalName
Inner Join tblExchangeServer On tblExchangeServer.ServerId =
tblExchangeUser.ServerId
Order By DisplayName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now