• this way is not exact, because when you type sqlcmd -E you will obtain à time out for sql connexion because your account dont existe in sys.logins.

    In the case when you have a login , it is not necessary to stop sql service you can access anr execute query like (create bultin\administrators from windows).

    The group bultin\administrators allows to system administratot to connect in sysadmin, the best practise is to change the role for this group to "public".

    When you install sql server, sql server add news groups like sysadmin login, you can add yout account in this group in order to connect you on sql server.

    I repeat, this article is not applied in sql server