■ Get-WmiObject 명령을 사용해 현재 사용자 계정을 구하는 방법을 보여준다.
▶ 실행 명령
1 2 3 4 5 6 7 |
Get-WmiObject -Class Win32_ComputerSystem -ComputerName localhost | select -ExpandProperty UserName -ErrorAction Stop Get-WmiObject -Class Win32_ComputerSystem -ComputerName 127.0.0.1 | select -ExpandProperty UserName -ErrorAction Stop Get-WmiObject -Class Win32_ComputerSystem -ComputerName 192.168.29.240 | select -ExpandProperty UserName -ErrorAction Stop |