标签:demo 序列 ima images image write it资讯 domain rdo
代码$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”
结果
序列号是 5CD60537FF
用户名是zengchuixin
域是demo
您也可以关注下方微信公众号获取更多IT资讯
标签:demo 序列 ima images image write it资讯 domain rdo
原文地址:https://blog.51cto.com/543925535/2367545