Unsharing 100 print queues

G

Guest

Hello,

I need to unshare about 100 print queues on a print server with is Windows
2000 std server.

Does anyone know of a tool or script that would help me on this.

Thanks
 
J

Jerold Schulman

Hello,

I need to unshare about 100 print queues on a print server with is Windows
2000 std server.

Does anyone know of a tool or script that would help me on this.

Thanks

Using rmtshare.exe from tip 6353 in the 'Tips & Tricks' at http://www.jsiinc.com,
the following batch will delete the print shares on computer ServerName

@echo off
setlocal
for /f "Tokens=1*" %%a in ('rmtshare \\ServerName^|FIND /V ":"^|FIND /V "command completed successfully."^|FIND /V "IPC$"') do (
rmtshare %%a /DELETE
)
endlocal

To do it from a CMD.EXE prompt:

for /f "Tokens=1*" %a in ('rmtshare \\ServerName^|FIND /V ":"^|FIND /V "command completed successfully."^|FIND /V "IPC$"') do rmtshare %a /DELETE



Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top