Lansweeper logo
Home Download Features Demo Buy now Help Support forum
 
    Most requested support articles:
  Lansweeper troubleshooting guide.
  The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
  WMI Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
  How to configure the windows firewall using group policies.
  Support:  
 support@lansweeper.com  
Skype: Lansweeper  
  Mo-Fri 9h-17h CET  
Welcome Guest Search | Active Topics | Log In | Register

Untag as favorite
PowerShell script to update Dell warranty info
pizzim13
#1 Posted : Thursday, February 24, 2011 5:37:35 PM
Rank: Freeware user

Groups: Member
Posts: 2
Attached is a PowerShell script I wrote to query dbo.tblSystemEnclosure for Dell computers, pull warranty info from Dell's support site, and add it to the dbo.tblCompCustomtable, which populates the Custom fields tab in LanSweeper. This will update the purchase date, warranty date, and custom 1 field with the service type, i.e. "Next Business Day Support". I wrote this with only my environment in mind but hopefully it can help others out.
File Attachment(s):
Dell_WarrLS.zip (2kb) downloaded 232 time(s).
pizzim13
#2 Posted : Tuesday, March 08, 2011 10:29:18 PM
Rank: Freeware user

Groups: Member
Posts: 2
If you only want to add the warranty infomation for new computers and not update the values for the entire table, change the value of $SQLQry from

$SQLQry = Invoke-Sqlcmd -Query "SELECT SerialNumber, Computername FROM lansweeperdb.dbo.tblSystemEnclosure WHERE LEN(serialnumber) = 7 AND Manufacturer LIKE 'Dell%'"

to

$SQLQry = Invoke-Sqlcmd -Query "SELECT SerialNumber, Computername FROM lansweeperdb.dbo.tblSystemEnclosure WHERE LEN(serialnumber) = 7 AND Manufacturer LIKE 'Dell%' AND Computername NOT IN (Select Computername from lansweeperdb.dbo.tblCompCustom)"


Lansweeper
#3 Posted : Wednesday, March 09, 2011 11:07:36 AM

Rank: Administration

Groups: Administration, Premium Users
Posts: 10,370
joegasper
#4 Posted : Monday, April 18, 2011 8:56:28 PM

Rank: Premium user

Groups: Member, Premium Users
Posts: 78
Location: Gainesville, FL
pizzim13,

Care to work your magic using the Dell web service for retrieving asset warranty info? No more screen scraping...

Run like: Dell_Wrnty_WebService.ps1 "servicetag"

Output like:

Information for Service Tag ASDF1234
Model: OptiPlex 320
Entitlement: NBD ONSITE
Provided by: Unisys
Starts: 7/12/2008
Ends: 7/12/2010
Entitlement: NBD ONSITE
Provided by: Unisys
Starts: 7/13/2007
Ends: 7/12/2008
File Attachment(s):
Dell_Wrnty_WebService.zip (1kb) downloaded 136 time(s).
Jono
#5 Posted : Friday, May 20, 2011 11:22:31 PM

Rank: Premium user

Groups: Member, Premium Users
Posts: 41
Location: Metro Detroit
I am running LS on a Windows 2003 server; no powershell.

All I really need is something that will fill in the custom1 field with the warranty type (I'll actually change it to custom3); I have the rest already. I don't mind having the script get the rest again in order to get the warranty type, though. What can I do to run this powershell script on a server with no powershell?

Thanks,
Jono
Users browsing this topic
Guest
Untag as favorite
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Contact: E-mail Lansweeper - Skype : Lansweeper
Copyright 2004 - 2011 © Hemoco bvba