[PowerShell] / Get-HpProductInfo.ps1 Repository:
ViewVC logotype

Log of /Get-HpProductInfo.ps1

Parent Directory Parent Directory


Links to HEAD: (view) (download) (annotate)
Sticky Revision:

Revision 34 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 19 12:39:12 2014 UTC (6 years, 2 months ago) by ian
File length: 44382 byte(s)
Diff to previous 33
cleaned up a lot of the commented out unneeded code;
have not yet fully tested in PS 2.0 but I'm almost positive it needs some tweaking to run on it;
changed main program logic so that info is always read from XML even if it was just downloaded due to some issue passing back the object for devices where the serial number matches multiple regions;

Revision 33 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 13 05:51:05 2014 UTC (6 years, 2 months ago) by ian
File length: 63844 byte(s)
Diff to previous 32
Constant variables to allow changing the target country;
If a serial number matches products for more than one region now instead of errors, it will automatically select the appropriate product based on the country constant variables;
Bug: When there are multiple matching products, it will output a bunch of errors on the first query for that serial number.  Subsequent queries will pull data that was cached and will display fine.

Revision 32 - (view) (download) (annotate) - [select for diffs]
Modified Sun Aug 3 17:53:28 2014 UTC (6 years, 2 months ago) by ian
File length: 32906 byte(s)
Diff to previous 31
Tweaked retry and timeout values when querying for warranty data;
Changed warranty date format so it can simply be copied and pasted into Excel and be recognized as a date value;
Tweaking spacing on warranty output to maintain column alignment;

Revision 31 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 9 05:24:43 2014 UTC (6 years, 3 months ago) by ian
File length: 32894 byte(s)
Diff to previous 27
Fixed Get-HpProductInfo.ps1 to function again with updated HP Warranty site;

Revision 27 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 10 03:04:53 2014 UTC (6 years, 8 months ago) by ian
File length: 33108 byte(s)
Diff to previous 26
Managed to get warranty data working in PowerShell 2.0 with an exponential delay between retries;

Revision 26 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 10 02:19:12 2014 UTC (6 years, 8 months ago) by ian
File length: 33040 byte(s)
Diff to previous 25
Fixed one line which prevented execution in a PowerShell 2.0 environment;
Doesn't seem capable of pulling warranty data using PowerShell 2.0;

Revision 25 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 10 01:45:24 2014 UTC (6 years, 8 months ago) by ian
File length: 33028 byte(s)
Diff to previous 24
Updated to-do list;
Removed un-needed commented out code;
Added a loop to verify/retry request of warranty data (seems pretty reliable);

Revision 24 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 10 01:02:25 2014 UTC (6 years, 8 months ago) by ian
File length: 35372 byte(s)
Diff to previous 21
Get-HpProductInfo.ps1 is fully working again including warranty data, but needs tweaked for more reliable retrieval of warranty data.

Revision 21 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 4 03:45:35 2014 UTC (6 years, 8 months ago) by ian
File length: 31856 byte(s)
Diff to previous 20
Fixed method invocation error when running the script in PowerShell 2;

Revision 20 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 3 05:46:59 2014 UTC (6 years, 8 months ago) by ian
File length: 31864 byte(s)
Diff to previous 19
Added ability to filter parts matching supplied additional parameter;

Revision 19 - (view) (download) (annotate) - [select for diffs]
Modified Sun Feb 2 22:31:19 2014 UTC (6 years, 8 months ago) by ian
File length: 30310 byte(s)
Diff to previous 18
OEM and Spare parts are now stored separately, so the object and XML format have changed slightly;
Most comments turned into Write-Debug lines for easier debugging;
Raw HTML data is now cached when using -Debug;
Since the order check boxes are no longer reliable non U.S. parts are filtered out using a list of terms;
Parts which have been superseded are now filtered out;
Sorry, still no warranty data, new site is a huge pain to scrape;

Revision 18 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 26 00:28:29 2013 UTC (6 years, 9 months ago) by ian
File length: 25276 byte(s)
Diff to previous 17
The HP PartSurfer site changed a week or so back and broke that part of the script as well, part and sku data lookup now works again;
Warranty lookup is still broken and proving to be very stubborn to scrape the new site;

Revision 17 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 7 00:13:32 2013 UTC (7 years ago) by ian
File length: 21714 byte(s)
Diff to previous 16
serial number is now trimmed of whitespace before processing;
script now accepts multiple serial numbers via pipeline and comma separated in line list;

Revision 16 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 3 06:15:33 2013 UTC (7 years ago) by ian
File length: 19226 byte(s)
Diff to previous 15
hopefully fixed mime types for display on TRAC and ViewVC;

Revision 15 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 16 01:18:50 2013 UTC (7 years, 1 month ago) by ian
File length: 19226 byte(s)
Diff to previous 14
added refresh switch to force fetching new data;
fixed custom object type error in PowerShell 3.0;
re-added count of order-able parts;

Revision 14 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 9 06:42:38 2013 UTC (7 years, 1 month ago) by ian
File length: 18568 byte(s)
Diff to previous 13
caching is now fully implemented;
date format for text output now only displays the date and not zeros for hours, mins, and seconds;

Revision 13 - (view) (download) (annotate) - [select for diffs]
Modified Mon Aug 26 05:38:55 2013 UTC (7 years, 2 months ago) by ian
File length: 13654 byte(s)
Diff to previous 12
proper param and info markup for using the Get-Help;
now returns plain text or supply the OjbectOutput switch to return an object;
I realized the implementation of nested objects is not proper, will do more research and try to fix later;

Revision 12 - (view) (download) (annotate) - [select for diffs]
Modified Sun Aug 25 05:39:05 2013 UTC (7 years, 2 months ago) by ian
File length: 10744 byte(s)
Diff to previous 11
now returns a full fidelity object instead of plain text;

Revision 11 - (view) (download) (annotate) - [select for diffs]
Modified Sat Aug 24 23:56:19 2013 UTC (7 years, 2 months ago) by ian
File length: 17444 byte(s)
Diff to previous 10
Get-HpProductInfo.ps1:
replaced some XML collections of data with hash tables and arrays to improve speed and use less code;
partially done modifying code to output an object instead of plain text;

Revision 10 - (view) (download) (annotate) - [select for diffs]
Modified Mon Aug 19 01:55:52 2013 UTC (7 years, 2 months ago) by ian
File length: 13324 byte(s)
Diff to previous 9
script is now provides full base functionality (product info, warranty, parts);

Revision 9 - (view) (download) (annotate) - [select for diffs]
Modified Sun Aug 18 00:07:30 2013 UTC (7 years, 2 months ago) by ian
File length: 5978 byte(s)
Diff to previous 8
Now sending cookie with country set to US so the server provides check boxes indicating orderable parts;
Filtering orderable parts by check box and then by -001 suffix;

Revision 8 - (view) (download) (annotate) - [select for diffs]
Modified Sat Aug 17 19:39:04 2013 UTC (7 years, 2 months ago) by ian
File length: 5496 byte(s)
Diff to previous 7
Eliminated many lines, improved readability, and speed by using silent erroraction when filting nodes by id instead of several lines of error checking;
New more robust method of iterating through parts;

Revision 7 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 16 05:28:28 2013 UTC (7 years, 2 months ago) by ian
File length: 4128 byte(s)
Diff to previous 5
Fully functional parsing of data from PartSurfer;

Revision 5 - (view) (download) (annotate) - [select for diffs]
Modified Sat Aug 10 06:33:52 2013 UTC (7 years, 2 months ago) by ian
File length: 2048 byte(s)
Copied from: get-hpPcInfo.ps1 revision 4
Diff to previous 4
Renamed get-hpPcInfo.ps1 to Get-HpProductInfo.ps1 and cleaned up experimental code;

Revision 4 - (view) (download) (annotate) - [select for diffs]
Modified Sat Aug 10 06:11:36 2013 UTC (7 years, 2 months ago) by ian
Original Path: get-hpPcInfo.ps1
File length: 8056 byte(s)
Diff to previous 3
IE COM manipulation was too inconsistent between different version of IE;
Managed to do some manual cleaning of the HTML so it will parse into XML;
Commented out experimental code left in for this commit just in case;

Revision 3 - (view) (download) (annotate) - [select for diffs]
Added Thu Aug 1 05:50:36 2013 UTC (7 years, 2 months ago) by ian
Original Path: get-hpPcInfo.ps1
File length: 5676 byte(s)
Added get-hpPcInfo.ps1;

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

Contact
ViewVC Help
Powered by ViewVC 1.0.4