1, $env:COMPUTERNAME
2, Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object -Property CSName
3, Get-WmiObject -Class Win32_OperatingSystem | Select-Object -Property CSName
4, Get-CimInstance -ClassName Win32_ComputerSystem | Select-Object Name
5, Get-WmiObject -Class Win32_ComputerSystem | Select-Object Name
Powershell获取计算机名称的方法
最新推荐文章于 2024-04-02 11:11:11 发布