none
How to tell if an object is a windows-based computer RRS feed

  • Question

  • I am writing a script that will connect to DHCP to retrieve all active leases, determine which of those are Windows based computers, and get some info from the computers, such as if there is a service for an antivirus product running.

    I am stuck on what test I could use to identify any object as a Windows based computer. I don't want to query AD since there could be computers that are not domain joined in the mix.

    All suggestions welcome!

    Thursday, January 18, 2018 9:40 PM

Answers

All replies

  • Get-WimObject Win32_OperatingSystem -ComputerName cname


    \_(ツ)_/

    Thursday, January 18, 2018 9:56 PM
  • Rather than trying to write this yourself, I would recommend looking into software that can do hardware and software inventory for you. A number of them are free.

    -- Bill Stewart [Bill_Stewart]

    Friday, January 19, 2018 3:04 PM
    Moderator
  • Such as "systeminfo"

    systeminfo /?


    \_(ツ)_/

    Friday, January 19, 2018 3:19 PM
  • Thanks for the suggestions - I am researching inventory tools now - if I find a good one I will post it here. If not, I will mark I.T. Delinquent's response as the answer!
    Monday, January 22, 2018 2:26 PM