how to use is_srvrolemember to list all server roles of a user For dealing with server permissions I am currently using 
 a procedure called sp_SrvPermissions V6.0 by Kenneth Fisher thank you Kenneth, however, 

while running a profile trace I often see the following line:

select is_srvrolemember('sysadmin') * 1 +
       is_srvrolemember('serveradmin') * 2 +
       is_srvrolemember('setupadmin') * 4 +
       is_srvrolemember('securityadmin') * 8 +
       is_srvrolemember('processadmin') * 16 +
       is_srvrolemember('dbcreator') * 32 +
       is_srvrolemember('diskadmin') * 64 +
       is_srvrolemember('bulkadmin') * 128


My question is:

How can I use the above script that uses is_srvrolemember to find out the server roles of mycompany\myuser?
The code you saw in profiler has nothing to do with the sp cited.

You can find explicit server roles of mycompany\myuser using following code:

select sp.name 
from sys.server_role_members rm join sys.server_principals sp 
        on rm.role_principal_id = sp.principal_id
where suser_name(member_principal_id) ='mycompany\myuser';


What I mean by explicit roles: these are roles to which the principal mycompany\myuser was added explicitely: exec sys.sp_addsrvrolemember 'mycompany\myuser', 'some_server_role'.

But your principal is Windows principal, this means he can inherit server role membership from different Windows groups of which he is member.

To find out all the roles he is member you should impersonate the principal and explore his login tokens:

execute as login = 'mycompany\myuser';

select *
from sys.login_token
where type = 'SERVER ROLE';


This will give you all the server roles mycompany\myuser is member of, those inherited from Windows groups included.