ASKER
ASKER
'Begin Script
'Remember to edit the printer address variables of strPrinter1 and strPrinter2 as well as the strComputer field
strComputer = "."
strPrinter1 = "\\server\Printer1"
strPrinter2 = "\\server\Copier1"
Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colPrinters = objWMI.ExecQuery("Select * From Win32_Printer")
For Each objPrinter in colPrinters
on error resume next
If Lcase(objPrinter.name) = Lcase(strPrinter1) Then
Set objNetwork = CreateObject("Wscript.Network")
objNetwork.RemovePrinterConnection strPrinter1
Else
If Lcase(objPrinter.name) = Lcase(strPrinter2) Then
Set objNetwork = CreateObject("Wscript.Network")
objNetwork.RemovePrinterConnection strPrinter2
End If
End If
Next
'End Script
ASKER
ASKER
ASKER
[Window Title]
Remove Device
[Main Instruction]
This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator.
[Content]
FollowMeLexmark on HQPRINTSVR01-VM
[OK]
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
Active Directory (AD) is a Microsoft brand for identity-related capabilities. In the on-premises world, Windows Server AD provides a set of identity capabilities and services, and is hugely popular (88% of Fortune 1000 and 95% of enterprises use AD). This topic includes all things Active Directory including DNS, Group Policy, DFS, troubleshooting, ADFS, and all other topics under the Microsoft AD and identity umbrella.
TRUSTED BY