daily pastebin goal
48%
SHARE
TWEET

all admin (hidden) shares disable

tolikpunkoff Sep 26th, 2018 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. Setlocal EnableDelayedExpansion
  3.  
  4. for /F %%i In ('net share') do (
  5.  
  6.     set ITEM=%%i
  7.     call :check !ITEM!
  8.  
  9. )
  10.  
  11. goto :eof
  12.  
  13. :check
  14.  
  15.     set V1=%1
  16.     set V2=%V1:$=%
  17.  
  18.     if NOT %V1%==%V2% (
  19.         echo %V1%
  20.         net share %V1% /delete
  21.     )
  22.  
  23. :eof
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top