Wmic Powershell Script to Extract/Get Computer Information Using "wmic" Command (Serial Number, Manufacturer, Model, Network Printers)
by matt392 in Circuits > Software
7492 Views, 9 Favorites, 0 Comments
Wmic Powershell Script to Extract/Get Computer Information Using "wmic" Command (Serial Number, Manufacturer, Model, Network Printers)
![powershell.png](/proxy/?url=https://content.instructables.com/FUG/M3SX/IWWFT0KI/FUGM3SXIWWFT0KI.png&filename=powershell.png)
![Wmic-Powershell.png](/proxy/?url=https://content.instructables.com/FLV/P7GL/KRAN0NL7/FLVP7GLKRAN0NL7.png&filename=Wmic-Powershell.png)
# Using wmic command to get information about computer and write to file
# To use: Right click on File name > Left click on "Run in Powershell"
# Or hit F5 from within Powershell ISE editor
# Create a file on the C drive
out-file c:\temp\computerinfofile.txt
# Get the serial number and overwrite text file if it exists already
wmic bios get serialnumber > c:\temp\computerinfofile.txt
# Get the manufacturer and add it to the end of the text file
wmic computersystem get manufacturer >> c:\temp\computerinfofile.txt
# Get the model of the computer and add it to the end of the text file
wmic computersystem get model >> c:\temp\computerinfofile.txt
# Get the printers that are connected to the computer and add to the end of the text file
wmic printer get name >> c:\temp\computerinfofile.txt
write-output "-------------------"
write-output "-------------------"
write-output "Please open the text file on your I drive now to check data."
write-output "Written by Matt R"