Leider ist der Eintrag nur auf Amerikanisches Englisch verfügbar. Der Inhalt wird unten in einer verfügbaren Sprache angezeigt. Klicken Sie auf den Link, um die aktuelle Sprache zu ändern.


According to a group membership of the current Windows workstation user, you want to run certain commands in a Windows Batch file (cmd, .bat).




Use file isMember.exe from here. The link also includes a usage example.



If you do not trust foreign .exe files, create a file isMember.bat e.g. with this content (original script):

Then run isMember.bat, your group name should be the parameter. You can then use the return code of this script in another one (variable ERROR_LEVEL). Make sure you run it with „call isMember.bat“ command, without „call“ your main script would also be exited.

Please note the „net user“ command used above might cut long group names, so solution 1 could be a better way.


Other ways, but also have to be parsed:




  [email protected]