How to find a users Local group memebrship through TSQL

  • Hello

    I'm trying to find the local windows group membership on the local machine through a tsql script. I have a query which I want to run for a bunch of users and I want to include in this script the users local windows group member ship. I tried using xp_commandShell with the 'net user' command but it doesn't have an option for this

    eg. exec xp_cmdshell "net user username /domain"

    Any help would be appreciated

    Regards

    Matt

  • Will it work for you: xp_cmdshell 'net localgroup Administrators'

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply