Need help with a collection or Query

Posted on 2008-11-18
Last Modified: 2013-11-21
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.
Question by:overflow34
    LVL 8

    Accepted Solution


    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
    LVL 2

    Author Comment

    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"
    LVL 2

    Author Comment

    I also receive this when using 4096

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    Every system administrator encounters once in while in a problem where the solution seems to be a needle in haystack.  My needle was an anti-virus version causing problems with my Exchange server. I have an HP DL350 with Windows Server 2008 Stand…
    Remote Apps is a feature in server 2008 which allows users to run applications off Remote Desktop Servers without having to log into them to run the applications.  The user can either have a desktop shortcut installed or go through the web portal to…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now