Microsoft Dynamics Ax developer's blog

Tuesday, July 30, 2013

How to become an axapta administrator with powershell


$sid = [System.Security.Principal.WindowsIdentity]::GetCurrent().User.Value

osql -d AXDBDEV -p -E -Q "update userinfo set sid = '$sid', networkdomain = '$env:userdomain', networkalias = '$env:username' where ID = 'admin'"

No comments: