如果要查询当前用户的sid可以使用下面命令进行查询

whoami /user

如果想查看所有用户的sid可以使用wmic命令查看

wmic useraccount get name,sid