Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Simply get computer name with serial number

$
0
0

Hi All,

I use the script below to get serial number, but I have no idea how to get the computer name in the meantime.

Pls point me.

$File = [System.IO.File]::OpenText("d:\111.txt")
 while($Machine = $GuyFile.ReadLine())
{Get-WmiObject -computername $Machine win32_SystemEnclosure }
$GuyFile.Close()


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>