Domanda

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
}
È stato utile?

Soluzione

Try below code

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

Altri suggerimenti

This will do it:

foreach($ma in Get-SPManagedAccount){$ma.UserName}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top