Get Hardware Information Using Powershell
Getting logon session information.
Get hardware information using powershell. Get all computer properties get computerinfo. If you want to get the information from another computer on your network you can simply use the computername parameter. Ps c get wmiobject class win32 logicaldisk computername ind dns1. The get computerinfo cmdlet gets a consolidated object of system and operating system properties.
On september 8 2010. You can get general information about logon sessions associated with users through the win32 logonsession wmi class. You can use filters such as drivetype to get the space information of a specific drive. Ps c get wmiobject class win32 desktop computername ind dns1 list available disk space.
When it comes to grabbing information from various. This cmdlet was introduced in windows powershell 5 1. It took so long because of two reasons number 1 i am new to vb scripting number 2. Description this is a simple script to retrieve all computer objects in active directory and then connect to each one and gather basic hardware information using cim.
The first information that the script will gather is the manufacturer and model of the pc. Windows os and hardware information using powershell getting information about windows os and it s hardware is crucial for system administrator s today. It will get the id of the cpu if there are multiple cpus and the model of the cpu. Powershell can display basic operating system information.
This command gets all system and operating system properties from the computer. I know many people have already figured it out in powershell way. How to get hardware details of servers using powershell. If you want to see.
Incidentally the get ciminstance cmdlet can display far more operating system information than what we are using here. The next two commands are related to the information of ram. Win32 logicaldisk will return all the available disk on a local computer. I got similar requirement today morning where i have to check hardware make and model of 10 servers.
After that the script will collect the information for the cpu s. But main question is how to collect it lot of companies have software like sccm scom and other tools to obtain this information. It will retrieve bios information about hardware cpu information memory ram open ports using sockets also see my module script for checking for open tcp ports ad account status and info available disk space on local drives ip address es on all network interfaces mac address es os version os service pack find the logged on user. You can display the user logged on to a particular computer system using win32 computersystem.
Get ciminstance classname win32 logonsession getting the user logged on to a computer.