' primitives Script zum Erstellen von Druckerports / richard borwinius 2012 DIM i,strIP,strName,strComputer strComputer = "." ' in der folgenden Zeile ist die Basis einzutragen strBASIS = "10.10.111." On Error Resume Next FOR i = 10 TO 254 strIP = strBASIS & i strName = "IP_" & strIP Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set objNewPort = objWMIService.Get ("Win32_TCPIPPrinterPort").SpawnInstance_ objNewPort.Name = strName objNewPort.Protocol = 1 objNewPort.HostAddress = strIP objNewPort.PortNumber = "9100" objNewPort.SNMPEnabled = true objNewPort.Put_ NEXT