forked from whistler-consulting/LenovoInfo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LenovoInfo.Help.pshproj
119 lines (116 loc) · 6.67 KB
/
LenovoInfo.Help.pshproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?xml version="1.0"?>
<ModuleObject xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" fVersion="1.1" type="Script" mclass="External" useSupports="false">
<Name>LenovoInfo</Name>
<Version>1.0</Version>
<Description>Used to retrieve warranty information on Lenovo devices</Description>
<ModulePath>C:\Users\mjenne\Documents\GitHub\LenovoInfo\LenovoInfo.psd1</ModulePath>
<HasManifest>false</HasManifest>
<OverridePostCount>false</OverridePostCount>
<FetchPostCount xsi:nil="true" />
<Cmdlets>
<CmdletObject verb="Get" noun="LenovoWarrantyInfo">
<Name>Get-LenovoWarrantyInfo</Name>
<Syntax>
<string>Get-LenovoWarrantyInfo [[-ComputerName] <String>] [-Credential <Object>]</string>
<string>Get-LenovoWarrantyInfo [-SerialNumber] <String> [[-Product] <String>]</string>
</Syntax>
<GeneralHelp>
<Synopsis>This cmdlet is designed to retrieve the warranty information for Lenovo devices.</Synopsis>
<Description>This cmdlet will take a supplied Lenovo serial number and product number and perform a warranty lookup using a published Lenovo REST API.
This cmdlet can also take a computer name as a parameter that will in turn retrieve the serial number and model number using WMI before
retrieving the warranty status.</Description>
<Notes>This cmdlet uses a REST API that was found in a Lenovo Support Forum discussion.</Notes>
<InputType />
<InputUrl />
<InputTypeDescription />
<ReturnType />
<ReturnUrl />
<ReturnTypeDescription />
</GeneralHelp>
<ParamSets>
<CommandParameterSetInfo2 Name="ByComputerName" Params="ComputerName Credential Verbose Debug ErrorAction WarningAction InformationAction ErrorVariable WarningVariable InformationVariable OutVariable OutBuffer PipelineVariable" />
<CommandParameterSetInfo2 Name="BySerialNumber" Params="SerialNumber Product Verbose Debug ErrorAction WarningAction InformationAction ErrorVariable WarningVariable InformationVariable OutVariable OutBuffer PipelineVariable" />
</ParamSets>
<Parameters>
<ParameterDescription type="String" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="true" pipeProp="true" isPos="true" pos="0" globbing="false">
<Name>ComputerName</Name>
<Attributes>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
</Attributes>
<Aliases />
<Description>The name of the computer that should be queried via WMI to retrieve its serial number for subsequent warranty lookup.</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="Object" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>Credential</Name>
<Attributes>
<string>System.Management.Automation.CredentialAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>The credential object representing the credentials that should be used when performing a WMI query of a remote computer.</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="String" varLen="false" required="true" dynamic="false" pipeRemaining="false" pipe="true" pipeProp="true" isPos="true" pos="0" globbing="false">
<Name>SerialNumber</Name>
<Attributes>
<string>System.Management.Automation.AliasAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
</Attributes>
<Aliases>
<string>SN</string>
</Aliases>
<Description>The serial number of the Lenovo device that should be used for the query.</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="String" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="true" pipeProp="true" isPos="true" pos="1" globbing="false">
<Name>Product</Name>
<Attributes>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
</Attributes>
<Aliases />
<Description>The Lenovo product code that should be used in the warranty lookup.</Description>
<DefaultValue />
</ParameterDescription>
</Parameters>
<Examples>
<Example>
<Name>Perform query on local machine</Name>
<Cmd>Get-LenovoWarrantyInfo</Cmd>
<Description>This command will query the local machine using WMI to retrieve its serial number and then query the Lenovo service to retrieve warranty information</Description>
<Output>Get-LenovoWarrantyInfo
WarrantyEndDate : 2017-08-04
ShipDate : 2014-07-23
Type : 20C0
SerialNumber : MP05SKGB
WarrantyStartDate : 2014-08-05
Model : S05200
Product : 20C0S05200</Output>
</Example>
<Example>
<Name>Lookup warranty information of remote computer</Name>
<Cmd>
$cred = Get-Credential
Get-LenovoWarrantyInfo -ComputerName yoga1 -Credential $cred </Cmd>
<Description>The first line creates a credential object to be used when connecting to remote computer using WMI
The second line will result in a WMI query to the computer named yoga1 using the supplied credential.
The WMI query will return the devices serial number and model information to supply or the warranty lookup.</Description>
<Output>
WarrantyEndDate : 2017-08-04
ShipDate : 2014-07-23
Type : 20C0
SerialNumber : MP05SKEZ
WarrantyStartDate : 2014-08-05
Model : S05200
Product : 20C0S05200</Output>
</Example>
</Examples>
<RelatedLinks />
<SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w10="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
<Publish>false</Publish>
</CmdletObject>
</Cmdlets>
</ModuleObject>