text stringlengths 0 834k |
|---|
:end |
@rem End local scope for the variables with windows NT shell |
if ""%ERRORLEVEL%""==""0"" goto mainEnd |
:fail |
rem Set variable SANDBOX_EXIT_CONSOLE if you need the _script_ return code instead of |
rem the _cmd.exe /c_ return code! |
if not """" == ""%SANDBOX_EXIT_CONSOLE%"" exit 1 |
exit /b 1 |
:mainEnd |
if ""%OS%""==""Windows_NT"" endlocal |
:omega |
",28.6111111111,114,0.7087378641 |
219987,f337282845542e81b5d11f9c827dd7a4feda99f0,67,bat,Batchfile,PushNuget.bat,stather/FreshMvvmRxUiInterop,01d7266a0ba4ea93b84747d9860482f5dba489cb,['MIT'],3.0,2017-08-10T21:12:00.000Z,2018-06-19T00:11:55.000Z,PushNuget.bat,stather/FreshMvvmRxUiInterop,01d7266a0ba4ea93b84747d9860482f5dba489cb,['MIT'],1.0,2017-08-04T12... |
",33.5,66,0.7313432836 |
219988,f3375992a9403f44fb425ee9e7f94bebd91bb388,2352,bat,Batchfile,multi_distro_check.bat,DAndrucyk/Multi_distro_checker_bat,c1a9b1f24b6a18f1726f5e09e1a329c10572ae83,['MIT'],,,,multi_distro_check.bat,DAndrucyk/Multi_distro_checker_bat,c1a9b1f24b6a18f1726f5e09e1a329c10572ae83,['MIT'],,,,multi_distro_check.bat,DAndrucyk/... |
setlocal enabledelayedexpansion |
cls |
:start |
rem Creating the start of the user array. UsrSI is starting at slot 1 (skipping 0 so it lines up with how people normally count) |
set ""UsrSI=1"" |
rem Creating the end of the user array. UsrEI is the end of the user array and is determined by what the user puts in |
set /P UsrEI=""How many users do you want to check? "" |
Rem To populate the UsrArray |
for /L %%i in (%UsrSI%,1,%UsrEI%) do ( |
rem adds entry to user array |
set /p UsrArray[%%i]=""Enter user ID: "" |
) |
rem Creating the start of the distribution list array. DLSI is starting at slot 1 (skipping 0 so it lines up with how people normally count) |
set ""DLSI=1"" |
rem Creating the end of the distribution list array. DLEI is the end of the distribution list array and is determined by what the user puts in |
set /P DLEI=""How many distribution lists/security groups do you want to check? "" |
Rem To populate the DLArray |
for /L %%i in (%DLSI%,1,%DLEI%) do ( |
rem adds entry to distribution list array |
set /p DLArray[%%i]=""Enter distribution list/security group: "" |
) |
Rem Loop to go through distribution lists |
For /L %%i in (%DLSI%,1,%DLEI%) do ( |
rem Loop to go through users |
for /L %%A in (!UsrSI!,1,!UsrEI!) DO ( |
set i= |
rem checks to see if the user is a member of a specified group |
for /f %%f in ('""dsquery user -samid !UsrArray[%%A]! | dsget user -memberof | dsget group -samid |findstr /m ""!DLArray[%%i]!""""') do set i=%%f |
rem outputs if the user is in the group or not. |
if !i!==!DLArray[%%i]! (echo !UsrArray[%%A]! is a member of !DLArray[%%i]!) ELSE (echo !UsrArray[%%A]! is not a member of !DLArray[%%i]!) |
) |
) |
rem prompt to ask if the user wants to clear the screen (only triggers on y) |
set /P clsscreen=""Clear screen? (y/n) "" |
rem clears screen if the previous prompt was answered with y |
if ""%clsscreen%""==""y"" (cls) |
set clsscreen= |
rem loops back to start to allow for repeated compairisons. |
goto :start |
",29.4,175,0.5816326531 |
219989,f33785e6b4d205e2b6ec6321fa85bdb8dc8fe850,148,bat,Batchfile,publish_tool_local.bat,elky84/ExtCopy,fd16c104a1ffc6f887155f33581942fdc6ce4029,['Apache-2.0'],1.0,2021-12-22T14:27:54.000Z,2021-12-22T14:27:54.000Z,publish_tool_local.bat,elky84/ext-copy,fd16c104a1ffc6f887155f33581942fdc6ce4029,['Apache-2.0'],,,,publish_... |
dotnet tool uninstall -g ExtCopy |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.