≡ Menu

Disable administrative shares

Windows automatically shares certain folders over the network, examples being C drive, C:\Windows & IPC$. Learn how to disable these administrative shares from command prompt.

Execute the below net share command to delete the system/hidden shares.

net share sharedFolder /delete

So to delete each of the system shares, we can run a separate command

net share C$ /delete
net share IPC$ /delete
net share ADMIN$ /delete


C:\>net share
Share name   Resource                        Remark
C$           C:\                             Default share
IPC$                                         Remote IPC
ADMIN$       C:\WINDOWS                      Remote Admin
The command completed successfully.

Now run the commands to disable the shares.

c:\>net share C$ /delete
C$ was deleted successfully.
c:\>net share  IPC$ /delete
IPC$ was deleted successfully.
c:\>net share ADMIN$ /delete
ADMIN$ was deleted successfully.
c:\>net share
There are no entries in the list.

Alternative command to delete system shares

Using for loop, we can run just one command that iterates over all administrative shares and issues delete command.

for %i in (C$ IPC$ ADMIN$) do net share %i /delete
0 comments… add one

Leave a Comment