We’re currently experiencing a high volume of support requests, which may result in longer response times — thank you for your patience and understanding.
Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
LifeInIT
Engaged Sweeper

I have an OU in Active Directory of all Disabled Users.  However we need to do some basic house keeping by deleting these profiles off of computers that are still being used by other users.  How can I create a report that gives me either ALL of the profiles on a PC by name, or matches the profiles on a PC by those in the Disabled Users OU?

1 REPLY 1
DavidPK
Lansweeper Tech Support
Lansweeper Tech Support

 

 

We've created a sample report. Instructions for adding this report to your Lansweeper installation can be found here: https://www.lansweeper.com/knowledgebase/how-to-add-a-report-to-your-lansweeper-installation/

If you are interested in building or modifying reports, we do recommend:
• Reviewing some SQL tutorials, as the Lansweeper report builder is a standard SQL editor. If you know SQL, you know how to build Lansweeper reports as well. This seems like a good tutorial: https://www.w3schools.com/sql/
• Making use of our database dictionary, which explains in great detail what each database table and field stores. More information on the dictionary can be found here: https://www.lansweeper.com/knowledgebase/accessing-the-lansweeper-database-documentation/
Checking out our report library: https://www.lansweeper.com/report/

 

Select Top 1000000 tblAssets.AssetUnique,

  tblUsersInGroup.AssetID,

  tblAssets.Domain,

  tblAssets.Description,

  tblUsersInGroup.Domainname,

  tblUsersInGroup.Username,

  tblUsersInGroup.Lastchanged,

  tsysOS.Image As icon,

  tblUsers.Disabled

From tblUsersInGroup

  Inner Join tblAssets On tblUsersInGroup.AssetID = tblAssets.AssetID

  Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID

  Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode

  Left Join tblUsers On tblUsers.AssetID = tblUsersInGroup.AssetID And

    tblUsers.Name = tblUsersInGroup.Username

Where Not Exists(Select Distinct * From (Select tblAssets.AssetName As Domain,

      tblUsers.Name As Username

    From tblAssets

      Inner Join tblUsers On tblAssets.AssetID = tblUsers.AssetID

    Where tblUsers.BuildInAdmin = 1 And tblUsersInGroup.Domainname Like

      tblAssets.AssetName And tblUsersInGroup.Username Like tblUsers.Name

    Union

    Select tsysadmins.Domain,

      tsysadmins.AdminName As username

    From tsysadmins

    Where tblUsersInGroup.Domainname Like tsysadmins.Domain And

      tblUsersInGroup.Username Like tsysadmins.AdminName) DERIVEDTBL) And

  tblUsersInGroup.Admingroup = 1 And tblAssetCustom.State = 1

Order By tblAssets.AssetName

 

General Discussions

Find answers to technical questions about Lansweeper.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now