|
Frank – you can use WMI to enumerate the
printers, here is a _vbscript_ that will run your command against each shared
printer. Save it as a vbs and run it with the server name as an argument, i.e.
printers.vbs printsvr1 ‘begin script ------------- On Error Resume Next Dim objShell, objArgs, objWMIService, objItem Dim strComputer, strPrinter, colItems Set objShell = WScript.CreateObject
("WScript.Shell") Set objArgs = WScript.Arguments strComputer = objArgs(0) Set objWMIService = GetObject("winmgmts:\\"
& strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select
ShareName from Win32_Printer",,48) For Each objItem in colItems strShareName = objItem.ShareName If strShareName <> "" Then strPrinter = "\\" &
strComputer & "\" & strShareName objShell.run("subinacl /printer
" &_ strPrinter &
" /grant=" & chr(34) & "WSADMINS" & chr(34)) End If Next ‘end script ----------------- Rich ----------------------------------------------------------- From: [EMAIL PROTECTED] on behalf of
Frank Abagnale Sent: Thu 10/13/2005 2:38 AM To: Active Subject: [ActiveDir] Subinacl print queue Hi, I need to grant a security group permissions to every
print queue on a Print Server. I have looked at SUBINACL and I can use this to grant
access to each print queue providing I know the name of the queue. e.g, subinacl /printer \\printsvr1\USATPR001
/grant="WSADMINS" The issue I have is that I don't know the name of
every print queue, is there someway I can use a wildcard to allow this command to
be run against every print queue listed on the server? thanks frank
|
- RE: [ActiveDir] Subinacl print queue Rich Milburn
- RE: [ActiveDir] Subinacl print queue Frank Abagnale
- RE: [ActiveDir] Subinacl print queue Frank Abagnale
- RE: [ActiveDir] Subinacl print queue Ulf B. Simon-Weidner
- RE: [ActiveDir] Subinacl print queue Rich Milburn
