Get-Computerinfo ... Help

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Del Del 5 months ago.

  • Author
  • #64662
    Profile photo of Del

    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
    Profile photo of Don Jones
    Don Jones

    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
      Profile photo of Del

      Thanks Don

You must be logged in to reply to this topic.