Link to home
Start Free TrialLog in
Avatar of bbimis
bbimis

asked on

get dell service tag for remote printer

is there a way with powershell to get the dell service tag off of a printer?
I know i can use wmic to get the service tag from the computer but i'm wanting to get them from the printer(s).  Thanks!
Avatar of Mohammed Khawaja
Mohammed Khawaja
Flag of Canada image

gwmi win32_bios -computername remotehost -credential domain\adminaccount

Asset tag will be under field serialnumber
ASKER CERTIFIED SOLUTION
Avatar of Spike99
Spike99
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bbimis
bbimis

ASKER

Yeah wmic will not work. I didn't know if there was another method. Thanks!
You're welcome!
Sorry, I didn't read the question completely that you want it for the printers.  You could get them as mentioned above from the web interface or from the telnet command also which could be scripted.
Avatar of bbimis

ASKER

well here is what i was trying to do but can't get it to work correctly.
if i go to the printers page it shows the serial number   here is the page source
User generated image
here is the code i'm trying to use but i'm at a lost
function Get-PrinterSN {
    param($query)
    $url = "$query\printer_info.htm"
    $result = Invoke-WebRequest $url

    $result.AllElements | 
        Where id -eq "info_table" |
        Select -First 1 -ExpandProperty innerText    
}

Open in new window


I'm wanting something like
Computer: 5.5.5.5  
Printer Serial: Dv9h78   or whatever


Thanks!