Printer as inventory items
Hi folks.
I am not sure if anyone else has done this already but we are interested in setting up printers so we can see them in the inventory of items. I see I can add machines so I was thinking while I may not be able to monitor the printers with the KBox agent at least I could get information on them quickly and connect to their web interfaces from there.
Anyone have some thoughts on this?
Thanks in advance.
--james
I am not sure if anyone else has done this already but we are interested in setting up printers so we can see them in the inventory of items. I see I can add machines so I was thinking while I may not be able to monitor the printers with the KBox agent at least I could get information on them quickly and connect to their web interfaces from there.
Anyone have some thoughts on this?
Thanks in advance.
--james
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
scottlutz
13 years ago
Posted by:
cblake
13 years ago
Here's a printer example (among other things) http://itninja.com/question/extending-the-computer-inventory-to-support-user-profile-specific-&-other-non-inventoried-data&mpage=1&key=printer
Here's another thought:
Connected network printers are normally assigned to the user and not the computer, if you want to have them in your computer inventory too, just use the attached script that will write a list of them to HKEY_LOCAL_MACHINE\Software\Dell\CustomInventory\NetworkPrinters. Just rename it to enum_network_printers.vbs and let it  run it as a script, it can run in the local system context and will scan the profiles off all users that are logged on to the computer. You can the collect the printers via custom inventory.
Here's another thought:
Connected network printers are normally assigned to the user and not the computer, if you want to have them in your computer inventory too, just use the attached script that will write a list of them to HKEY_LOCAL_MACHINE\Software\Dell\CustomInventory\NetworkPrinters. Just rename it to enum_network_printers.vbs and let it  run it as a script, it can run in the local system context and will scan the profiles off all users that are logged on to the computer. You can the collect the printers via custom inventory.
const HKEY_CURRENT_USER = &H80000001
const HKEY_LOCAL_MACHINE = &H80000002
const HKEY_USERS = &H80000003
On Error Resume Next
strComputer = "."
Dim aPrinterList()
Redim aPrinterList(0)
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
objWMIService.EnumKey HKEY_USERS, "", aUsers
If VarType(aUsers) = 8204 Then
For i = 0 To UBound(aUsers)
sCurrentUser = aUsers(i)
objWMIService.EnumKey HKEY_USERS, sCurrentUser & "\Printers\Connections", aPrinters
If VarType(aPrinters) = 8204 Then
For j = 0 To UBound(aPrinters)
sPrinter = Replace(aPrinters(j), ",,", "\\")
sPrinter = Replace(aPrinters(j), ",", "\")
iCurrentIndex = UBound(aPrinterList) + j
Redim Preserve aPrinterList(iCurrentIndex)
aPrinterList(iCurrentIndex) = sPrinter
Next
End If
Next
objWMIService.CreateKey HKEY_LOCAL_MACHINE, "Software\Dell\CustomInventory"
If Join(aPrinterList, ",") <> "" Then
objWMIService.SetStringValue HKEY_LOCAL_MACHINE, "Software\Dell\CustomInventory", "NetworkPrinters", Join(aPrinterList, ",")
End If
End If
Posted by:
RichB
13 years ago
We created an Asset Type called Printers and store information there. Create a new Asset Type and play with all the options. Existing spreadsheets are easily imported with a csv file. With the new feature added of having a web link as a field you can now put in an IP or name of a printer in there. It doesn't assume "http://" so that must be entered too. Your fields will be different but here's a screen shot of what we use.
Posted by:
jbowes
13 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.