Question

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
}
Was it helpful?

Solution

Try below code

foreach($ma in get-spmanagedaccount)
{ 
 write-host $ma.DisplayName
 write-host $ma.UserName
}

OTHER TIPS

This will do it:

foreach($ma in Get-SPManagedAccount){$ma.UserName}
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top