Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

trying to get every pc in the office’s Computer model, user, and serial number.

$
0
0

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.


Viewing all articles
Browse latest Browse all 8793

Trending Articles