→ Celebrate SysAdmin Day 2024 with Lansweeper Enter our Giveaway here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Simmarc
Engaged Sweeper
I am currently trying to do a report where I would see all the different computers in 6-7 different OU in our domain. I've managed to do that by adding the tsysASOU argument in the report, but I'm getting weird information. Basically, instead of showing me in which OU a specific computer is located in, it's showing me the same computer in all 7 different OUs. Now, I know for a fact that it's only in ONE OU, but LS still shows it to me in all of them.

Is there another argument I can add in my report configuration that would show the real OU location?

Thank you!
4 REPLIES 4
Simmarc
Engaged Sweeper
Working good! Basically, using tblADComputers then OU instead of what I had used would seem to make it better.

Thanks a lot!
Hemoco
Lansweeper Alumni
try this

Select Top 1000000 tblComputers.LastknownIP As IP, tblComputers.ComputerUnique,
tblComputers.Domain, Web40OSName.OSname, tblADComputers.OU
From tblComputers Inner Join
web40ActiveComputers On tblComputers.Computername =
web40ActiveComputers.Computername Inner Join
Web40OSName On Web40OSName.Computername = tblComputers.Computername Inner Join
web40AllIPLocations On web40AllIPLocations.Computername =
tblComputers.Computername Inner Join
tblADComputers On tblComputers.Computername = tblADComputers.Computername
Where tblComputers.LastknownIP <> ''
Order By tblComputers.IPNumeric
Simmarc
Engaged Sweeper
That's what I have:

Select Top 1000000 tblComputers.LastknownIP As IP, tblComputers.ComputerUnique,
tblComputers.Domain, Web40OSName.OSname, tsysASOU.OU
From tblComputers Inner Join
web40ActiveComputers On tblComputers.Computername =
web40ActiveComputers.Computername Inner Join
Web40OSName On Web40OSName.Computername = tblComputers.Computername Inner Join
web40AllIPLocations On web40AllIPLocations.Computername =
tblComputers.Computername,
tsysASOU
Where tblComputers.LastknownIP <> ''
Order By tblComputers.IPNumeric
Hemoco
Lansweeper Alumni
Can you post your sql code please.