Dim oArgs, SourceID, ManagedEntityId, TargetComputer, NetbiosName, oAPI, oDiscoveryData, oInst, objSet, obj, name, value, status
Set oArgs = WScript.Arguments
If oArgs.Count < 4 Then
Wscript.Quit -1
End If
name = CStr(Getvalue("Name", obj)) & " (" & NetbiosName & ")"
Call oInst.AddProperty("$MPElement[Name='Microsoft.Windows.Server.10.0.PrintServer.Printer']/Name$", name) ' Key Attribute
' value = Getvalue("Version", obj)
' if not(IsNull(value)) then Call oInst.AddProperty("$MPElement[Name='Microsoft.Windows.Server.10.0.PrintServer.Printer']/Version$", CStr(value))
value = Getvalue("Attributes", obj)
if not(IsNull(value)) then Call oInst.AddProperty("$MPElement[Name='Microsoft.Windows.Server.10.0.PrintServer.Printer']/Attributes$", CStr(value))
value = Getvalue("Caption", obj)
if not(IsNull(value)) then Call oInst.AddProperty("$MPElement[Name='Microsoft.Windows.Server.10.0.PrintServer.Printer']/Caption$", CStr(value))
value = Getvalue("DeviceID", obj)
if not(IsNull(value)) then Call oInst.AddProperty("$MPElement[Name='Microsoft.Windows.Server.10.0.PrintServer.Printer']/DeviceID$", CStr(value))
value = Getvalue("PortName", obj)
if not(IsNull(value)) then Call oInst.AddProperty("$MPElement[Name='Microsoft.Windows.Server.10.0.PrintServer.Printer']/PortName$", CStr(value))
value = Getvalue("Shared", obj)
if not(IsNull(value)) then Call oInst.AddProperty("$MPElement[Name='Microsoft.Windows.Server.10.0.PrintServer.Printer']/Shared$", CStr(value))
value = Getvalue("ShareName", obj)
if not(IsNull(value)) then Call oInst.AddProperty("$MPElement[Name='Microsoft.Windows.Server.10.0.PrintServer.Printer']/ShareName$", CStr(value))
value = Getvalue("SpoolEnabled", obj)
if not(IsNull(value)) then Call oInst.AddProperty("$MPElement[Name='Microsoft.Windows.Server.10.0.PrintServer.Printer']/SpoolEnabled$", CStr(value))