→ Having trouble accessing our new support portal or creating a ticket? Please notify our team here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
servicedesk
Champion Sweeper II
This report shows AD users without Logon Script but some users don't need to be checked.

Some user OU examples:

OU=Spain, OU=EUROPE, OU=User_Accounts, DC=mydomain, DC=net
OU=Common_Users, OU=Spain, OU=EUROPE, OU=User_Accounts, DC=mydomain, DC=net
OU=IT, OU=Spain, OU=EUROPE, OU=User_Accounts, DC=mydomain, DC=net
OU=IT, OU=TEST, OU=Spain, OU=EUROPE, OU=User_Accounts, DC=mydomain, DC=net
OU=Greece, OU=EUROPE, OU=User_Accounts, DC=mydomain, DC=net

I don't need to list the Highlighted ones but will need list only the users with OU=SPAIN


Many thanks

Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
tblADusers.LogonScript,
tblADusers.OU
From tblADusers
Where tblADusers.LogonScript Is Null
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
You can filter out these OU's in a report like the following example. Note: When using filters on OU's, remove the space behind each comma.

Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
tblADusers.LogonScript,
tblADusers.OU
From tblADusers
Where tblADusers.LogonScript Is Null And
tblADusers.OU Not In
('OU=Common_Users,OU=Spain,OU=EUROPE,OU=User_Accounts,DC=mydomain,DC=net',
'OU=IT,OU=Spain,OU=EUROPE,OU=User_Accounts,DC=mydomain,DC=net',
'OU=IT,OU=TEST,OU=Spain,OU=EUROPE,OU=User_Accounts,DC=mydomain,DC=net')

View solution in original post

1 REPLY 1
Daniel_B
Lansweeper Alumni
You can filter out these OU's in a report like the following example. Note: When using filters on OU's, remove the space behind each comma.

Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
tblADusers.LogonScript,
tblADusers.OU
From tblADusers
Where tblADusers.LogonScript Is Null And
tblADusers.OU Not In
('OU=Common_Users,OU=Spain,OU=EUROPE,OU=User_Accounts,DC=mydomain,DC=net',
'OU=IT,OU=Spain,OU=EUROPE,OU=User_Accounts,DC=mydomain,DC=net',
'OU=IT,OU=TEST,OU=Spain,OU=EUROPE,OU=User_Accounts,DC=mydomain,DC=net')

New to Lansweeper?

Try Lansweeper For Free

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

Try Now