2014-03-30 2 views

답변

6

WMI- 쿼리를 사용하여이를 얻을 수 있습니다.

function Get-LocalUser ($Computername = $env:COMPUTERNAME) { 
    Get-WmiObject -Query "Select * from Win32_UserAccount Where LocalAccount = 'True'" -ComputerName $ComputerName | 
    Select-Object -ExpandProperty Name 
} 

Get-LocalUser -ComputerName "TestPC1" 
관련 문제