2014. 9. 19. 09:29
1.현재 로그온 한 도메인 확인
$env:userdomain
2.로그온 한 사용자 계정 확인
$env:username
3.로그온한 사용자 계정의 SID, 인증 종류,
[System.Security.Principal.WindowsIdentity]::GetCurrent()
4.특정한 항목만 가져오기
[System.Security.Principal.WindowsIdentity]::GetCurrent() |
Select-Object -ExpandProperty User
출처 : http://cloudsns.wordpress.com/category/microsoft/powershell/page/13/
'powershell' 카테고리의 다른 글
Disk 관리하기 (미확인) (0) | 2014.09.19 |
---|---|
자신이 입력한 cmdlet을 파일로 저장하기 (0) | 2014.09.19 |
SQL Server 2008 이상에서 PowerShell 사용하기 (부분미확인) (0) | 2014.09.18 |
스냅인 WASP(Windows Automation Snapin for Powershell) (0) | 2014.09.18 |
서버관리 (0) | 2014.09.18 |