Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

PDQ Inventory - creating a filter

Good Morning, 

 

Our organization has many kiosk computers that have a user (domain) account that is the exact name of the computer itself.  I'm trying to find all computer that have a local user that has the same name as the computer name.  How would I build this filter?

0

Comments

6 comments
Date Votes
  • Are you OK with using the Current User field, or do you want to do an AD lookup?

    0
  • I was going to use the Local User field, that way regardless of if the machine is logged on, you can still pull that user. 

    0
  • Where is the Local User field? I can't find it in PDQ or AD. Is that a Custom Field that you created?

    0
  • Oops, I'm blind. Disregard my previous comment :)

    0
  • So how would you suggest I build that query in my original question?

    0
  • I think this SQL Report will do what you are asking for, but I'm not sure.

    select
    Computers.Name as "Computer Name",
    LocalGroupMembers.UserName as "User Name",
    LocalGroupMembers.GroupName as "Group Name"
    from Computers inner join
    LocalGroupMembers on LocalGroupMembers.ComputerId = Computers.ComputerId
    where
    LocalGroupMembers.UserName LIKE Computers.Name
    and
    <ComputerFilter>
    0