HPWarranty | PowerShell module to help retrieve Hewlett | Command Line Interface library
kandi X-RAY | HPWarranty Summary
kandi X-RAY | HPWarranty Summary
Finally getting this working a bit again, refractor in progress. This module can be installed from the PowerShellGallery. You need WMF 5 to use this feature. HP has recently split into two divisions, and this a first attempt to support both HP server and workstation warranty via PowerShell. I currently have no way to check if a machine is a 'Server' or a 'Workstation', so that falls on you, for now. I have added the error returned from HP to the errorstream, so you should be able to tell what the issue is more easily. This is still very beta, so please report any issues. Thanks.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of HPWarranty
HPWarranty Key Features
HPWarranty Examples and Code Snippets
# Execute from local HP workstation.
Get-HPIncWarrantyEntitlement
# Execute against remote HP workstation (must be on).
Get-HPIncWarrantyEntitlement -ComputerName 'MyFriendsHP.ourdomain.org' -Credential (Get-Credential)
# Execute for local HP Serve
Install-Module -Name HPWarranty
Community Discussions
Trending Discussions on HPWarranty
QUESTION
I need to check the warranty of many servers, but the output returned by the module I found in https://www.powershellgallery.com/packages/HPWarranty/2.6.2 seems to be a hashtable and the first column contains what I want to be my rows.
the script below will return this where every 5 rows the fields repeat - output1.csv:
TYPE System.Management.Automation.PSCustomObject
"Component","Codecount"
"SerialNumber","CZ36092P5H"
"ProductNumber","727021-B21"
"OverallEntitlementStartDate","2016-03-04"
"OverallEntitlementEndDate","2019-04-02"
"ActiveEntitlement","true"
"SerialNumber","CZ36092P5K"
"ProductNumber","727021-B21"
"OverallEntitlementStartDate","2016-03-04"
"OverallEntitlementEndDate","2019-04-02"
"ActiveEntitlement","true"
How can I transpose the output so that SerialNumber, ProductNumber, OverallEntitlementStartDate, OverallEntitlementEndDate and ActiveEntitlement are the columns?
...ANSWER
Answered 2017-Jun-12 at 13:42Cast the output hashtable to a [pscustomobject]
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install HPWarranty
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page