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.

Exclude machines with "allow scan" turned off in a SQL report

Good morning,

Has anyone figured out how to exclude a machine with "allow scan" disabled within a PDQ Inventory SQL report?

If so please let me know how - thank you very much.

Chris

1

Comments

1 comment
Date Votes
  • That is stored in the AllowScan field of the Computers table. 0 = disabled, 1 = enabled.

    This example will show the Name and PSVersion fields for all computers that have Allow Scan enabled.

    SELECT
    Computers.Name AS "Computer Name"
    , Computers.PSVersion AS "PowerShell Version"
    FROM
    Computers
    WHERE
    Computers.AllowScan = 1
    AND
    <ComputerFilter>
    ORDER BY
    Computers.Name COLLATE NOCASE
    1