echo offnet group "domain admins" /domain | find "%username%" > nulif errorlevel 1 goto notadmingoto admin:admin echo "these action will be performed if the current user is in the group" goto quit:notadmin echo "notadmin":quit