all admin (hidden) shares disable
tolikpunkoff Sep 26th, 2018 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- @echo off
- Setlocal EnableDelayedExpansion
- for /F %%i In ('net share') do (
- set ITEM=%%i
- call :check !ITEM!
- goto :eof
- set V1=%1
- set V2=%V1:$=%
- if NOT %V1%==%V2% (
- echo %V1%
- net share %V1% /delete
RAW Paste Data