How to write a script to get computer info..?

Specifically I need (model, computer name, cpu, core count, and ram count). Then I need to export as csv file txt.

Thanks!

Look at the help of the Get-CimInstance cmdlet and use the ‘ClassName’ parameter, and the ‘Win32_ComputerSystem’ and ‘Win32_Processor’ classes. That will give you the information you need.

I am really stuck. I need the actual answer…

Timothy
Welcome to the forum. :wave:t4:

Acutally we expect you to make an own attempt to solve your problem in the first place. And I’m pretty sure with a few seconds of google search you would have found several answers because this question has been asked thousand times before and has been answered thousand times before. And because Microsoft even has a heart for lazy admins and likes to make it convinient for them there is a single cmdlet for this. So you don’t need a script:

Get-ComputerInfo
4 Likes

image