Is there a way I can change the representation of the result of the OU(Canonical Name of object) here in Lansweeper?
eg.
instead of "OU=Test, OU=Prod Users, OU, OU=Testing OU, DC=mydomain, DC=COM"
I want to show this kind of format so I can read the result easily.
mydomain.com/Testing OU/Prod Users/Test
Hope there is a way 🙂
------------------------------------------------
Select Top 1000000 tblADusers.Username,
tblADusers.Name,
tblADusers.OU,
tblADusers.whenCreated,
tblADusers.IsEnabled,
tblADusers.LastLogon
From tblADusers
Left Join (Select Top 1000000 tblCPlogoninfo.Username,
tblCPlogoninfo.Domain As Userdomain,
Max(tblCPlogoninfo.logontime) As Lastlogon
From tblCPlogoninfo
Group By tblCPlogoninfo.Username,
tblCPlogoninfo.Domain) SubQuery1 On SubQuery1.Username =
tblADusers.Username And SubQuery1.Userdomain = tblADusers.Userdomain
Where tblADusers.OU Not Like '%Disabled%' And tblADusers.LastLogon < GetDate() - 90
Order By tblADusers.LastLogon