0
samaccountname
을 반환하는 powershell 명령을 작성하고 정확하게 원하는 것은 얻지 못합니다. powershell 형식이 지정되지 않은 samaccountuser를 얻습니다.
NRealuser
그래서 내가 헤더없이
samaccountname
를 원하는 :
SamAccountName
--------------
NRealuser
이 내가 원하는 무엇인가 :
PS C:\> (get-aduser -Server -f {(GivenName -eq "Nota") -and (Surname -eq "Realuser")} -Properties SamAccountName | select SamAccountName)
이 내가 무엇을 얻을 수 있습니다.
SAMAccountName을 기본적으로 반환되고 그래서 당신은 할 필요가 없습니다 '-Properties SamAccountName'을 지정하십시오. @ frode-f에 명시된 바와 같이 ExpandProperty 매개 변수는 필요한 것입니다. – tommymaynard