Need help with a collection or Query

I would like to create a collection or report that excludes deactivated computer accounts.  I copied over the all computers collection but could not find a variable to remove deactivated computer accounts.  

The goal is to see all active computer accounts so we can see what does not have the client installed.  

A second report that I will need to figure out is what computers do not have the client installed.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


You can do this using the attribute UserAccountControl in System Resource.

For example to query for all computers with disable accounts in AD:
select distinct SMS_R_System.Name from  SMS_R_System where SMS_R_System.UserAccountControl = "4098"

If you want all computers with enable accounts change the UserAccountControl to 4096

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
overflow34Author Commented:
I receive an error when trying this.  I put the code into the query and was able to save without any errors.  When I right click and select run query I receive the error below.

Run Query

The following error was reported
Running the query:
select distinct SMS_R_System.Name from  SMS_R_System where SMS_R_System.UserAccountControl = "4098"
overflow34Author Commented:
I also receive this when using 4096
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Server OS

From novice to tech pro — start learning today.