If %i% EQU 2 NET USE G: \\SERVER2\Folder /persistent:yes If %i% EQU 1 NET USE F: \\SERVER1\Users\%USER% /persistent:yesįor /f %%f in ('"NET USER %USER% /domain | findstr /i /c:%GROUP2%"') DO SET /a i=2 The actual file is MUCH larger SET GROUP1="Sec_Group1"įor /f %%f in ('"whoami /fqdn | findstr /c:OU=%OU1%"') DO GOTO TITLE1įor /f %%f in ('"whoami /fqdn | findstr /c:OU=%OU2%"') DO GOTO TITLE2įor /f %%f in ('"NET USER %USER% /domain | findstr /i /c:%GROUP1%"') DO SET /a i=1 I have removed some specific information obviously but this is the gist of what it has. It works for me when running in the bat file but it does not work for normal user and I am stuck. I am attempting to map some drives based of user groups and what OU a user is in.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |