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

Comments

1 comment

  • Colby Bouma

    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
    Comment actions Permalink

Please sign in to leave a comment.