PS script finds Windows XP boxes as Windows 7 and Windows 10

This topic contains 2 replies, has 2 voices, and was last updated by  Mossy 6 months, 2 weeks ago.

  • Author
  • #85267


    Hello all. I ran the script below. the goal was to locate all windows XP machines across the enterprise. The script found no Windows XP machines. However, Qualys and NMAP have proven that there are XP machines in the enterprise. any one have any idea how this script missed them? We know the XP devices are in the domain. We verified by remoting to some of the XP machines.

    Get-ADComputer -Filter * -Properties OperatingSystem,LastLogonDate | select Name, OperatingSystem, LastLogonDate | sort LastLogonDate -unique | Export-Csv c:\work\computers.csv

    Any help is appreciated.

  • #85268

    Don Jones

    AD's "OperatingSystem" field is updated when the computer logs on. It's possible those computers aren't formally logging onto the domain; it's also possible that, for some reason unique to those computers, they aren't updating that field when the log on.

    The OperatingSystem field is really meant to be a convenience; it isn't intended (by Microsoft) as an accurate inventory data point.

    • #85274


      Thanks Don, always helpful!!

You must be logged in to reply to this topic.