get-spmanagedaccount how to get the samaccountname and not sid
-
09-10-2020 - |
Pregunta
When I do following i get sid
. How do i get the account name (domain\svc-search) etc.
foreach($ma in get-spmanagedaccount)
{
write-host $ma
}
Solución
Try below code
foreach($ma in get-spmanagedaccount)
{
write-host $ma.DisplayName
write-host $ma.UserName
}
Otros consejos
This will do it:
foreach($ma in Get-SPManagedAccount){$ma.UserName}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a sharepoint.stackexchange