< Back

Get-OHComputerInfo

Sat Jan 18, 2020 5:45 pm

NAME Get-OHComputerInfo



SYNOPSIS

Gets computer information such as NIC, OS, Disks, processor details etc.





SYNTAX

Get-OHComputerInfo [[-ComputerName] <String[]>] [<CommonParameters>]





DESCRIPTION

By default, this will pull basic but fundamental info from the computer such as OS, OSBuild, OS Service Pack

version, OS Architecture and Manufacturer. (The Manufacturer will let you know if the computer is virtual or not)

Use the -verbose switch to see which computers failed the connection test.





PARAMETERS

-ComputerName <String[]>

The name of the computer that you wish to query.



Required? false

Position? 1

Default value $env:COMPUTERNAME

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





https://www.fearthepanda.com

https://github.com/ozthe2



-------------------------- EXAMPLE 1 --------------------------



Get-OHComputerInfo



ComputerName : COMPUTER01

OS : Microsoft Windows 10 Enterprise

OSBuild : 16299

OSSPVersion : 0

OSArchitecture : 64-bit

Manufacturer : Dell Inc.



The computer system information of the local host will be displayed on screen.

-------------------------- EXAMPLE 2 --------------------------



'computer1','computer2' | Get-OHComputerInfo



The computer information of 'Computer1' and 'Computer2' will be displayed on screen.

-------------------------- EXAMPLE 3 --------------------------



(get-adcomputer -filter * -SearchBase 'ou=servers,ou=MyOU,dc=mydomain,dc=local').name | Get-OHComputerInfo |

export-csv C:\\Output.csv -NoTypeInformation



The computer objects in the OU obtained by 'Get-ADComputer' will have all available computer information output to

a CSV file.

-------------------------- EXAMPLE 4 --------------------------



get-content c:\\ohtemp\\servers.txt | Get-OHComputerInfo



The computer names contained in Servers.txt will be used as the input of the command.

-------------------------- EXAMPLE 5 --------------------------



Get-OHComputerInfo | out-file ('{0}{1}{2}' -f "C:\\temp\\Output-", (get-date -Format MMMyyy), ".log")



The local computer will be queried, and the result written to a dated file named 'Output-MonthYear.log' eg

Output-July2018.log

-------------------------- EXAMPLE 6 --------------------------



Get-OHComputerInfo | Format-List *



Display all available information from the local computer



RELATED LINKS

Online Version: