$serial = (Get-WmiObject -ComputerName localhost -Class Win32_BIOS).SerialNumber
$name=Get-WmiObject -Class Win32_UserAccount -Filter "Name='$env:username' and Domain='$env:userdomain'"
$username=$name.Name
$domain=$name.Domain
Write-Host -ForegroundColor Green "序列号是 $serial"
Write-Host -ForegroundColor Green "用户名是$username“
Write-Host -ForegroundColor Green "域是$domain”