I'm using Power Shell script to get user.
I have include the Domain name in EnsureUser - Domain\Username
Please check below code.
$AuthorLoginName = "domain\akshay"
try{
[Microsoft.SharePoint.SPUser]$Author = $w.EnsureUser($AuthorLoginName) }
catch
{}
Please suggest some workaround
i:0#.w|domain\akshay?