this is what im trying to work with. sorry if the answer is simple, i’m new to powershell.
$computers = Get-Content -path C:chi_desktops2.txt $log = -path “c:laptop_log.txt”
foreach($computer in $computers){
(gwmi win32computersystem -comp $computer | select UserName, Caption, Manufacturer, model | ForEach-Object {$.serialnumber})
}
foreach($computer in $computers){
(gwmi win32_bios -comp chihq-it49 | fl SerialNumber)
}
submitted by /u/fazelove
[link] [comments]
The post trying to get every pc in the office’s Computer model, user, and serial number. appeared first on How to Code .NET.