Get-Computerinfo ... Help

This topic contains 2 replies, has 2 voices, and was last updated by  Del 8 months ago.

  • Author
    Posts
  • #64662

    Del
    Participant

    Hi guys,

    I'm trying this code but re turns only one computer

    Get-ADComputer -Filter * | Get-ComputerInfo | Select CsDomain, CsName, LogonServer, CsCaption, CsDomainRole, CsDNSHostName, OsName, OsInstallDate, OsVersion, WindowsCurrentVersion, OsProductType, OsArchitecture, OsLanguage, WindowsEditionId, WindowsInstallationType, WindowsProductId, OsCountryCode, OsLocale, OsLocalDateTime, OsLastBootUpTime, OsUptime,OsMuiLanguages,OsSerialNumber,OsStatus, OsSuites, OsServerLevel, KeyboardLayout, TimeZone, WindowsRegisteredOrganization

    Returns multiple values with only one computer name which is the first computer from Get-adcomputer -Filter *

    Tried Foreach, same output ...
    Tried invoke-command – But I have to enter each computer name in the domain 'Which is painful!' ... Any opinions ?

  • #64770

    Don Jones
    Keymaster

    Get-ComputerInfo doesn't accept AD computer objects as input, and doesn't run against remote computers. You would in fact need to use Invoke-Command and Remoting. Invoke-Command doesn't accept computer names from the pipeline.

    -ComputerName (Get-ADComputer -Filter * | Select -Expand Name)

    Should work, though.

    • #64830

      Del
      Participant

      Thanks Don

You must be logged in to reply to this topic.