Jump to content

DAlderman

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

My Information

  • Location
    New Zealand
  • Agent Count
    < 500 Agents
  1. Thank you for the warranty lookup script, I have it working for HP Workstations, but not tested with a server just yet - you need to open an elevated powershell on the Labtech server and run the following one time before it works for HP. Install-Module -Name HPWarranty My contribution back is I have added scripts for Dynabook/Toshiba and Microsoft Corporation - Replace the script posted by DrPugh with the one below. Dynabook warranty lookup was easy enough. Microsoft was a tricky one, I used the Surface Diagnostic Toolkit on a Microsoft Device to look up its own warranty whilst capturing with Wireshark. I saw it negotiate a TLS connection with "surfacewarrantyservice.azurewebsites.net" I googled this and it returned Kelvin Tegelaar's blog here. https://www.cyberdrain.com/automating-with-powershell-automating-warranty-information-reporting/ So I have adapted his script to suit this application. Drop this entire script over the one DrPugh posted above and remember to replace your Dell API key if you have one. Import-Module LabTech Connect-LTDatabase Add-Type -AssemblyName System.Web [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 add-type @" using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult( ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) { return true; } } "@ [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy function Split-array { <# .SYNOPSIS Split an array .NOTES Version : July 2, 2017 - implemented suggestions from ShadowSHarmon for performance .PARAMETER inArray A one dimensional array you want to split .EXAMPLE Split-array -inArray @(1,2,3,4,5,6,7,8,9,10) -parts 3 .EXAMPLE Split-array -inArray @(1,2,3,4,5,6,7,8,9,10) -size 3 #> param($inArray,[int]$parts,[int]$size) if ($parts) { $PartSize = [Math]::Ceiling($inArray.count / $parts) } if ($size) { $PartSize = $size $parts = [Math]::Ceiling($inArray.count / $size) } $outArray = New-Object 'System.Collections.Generic.List[psobject]' for ($i=1; $i -le $parts; $i++) { $start = (($i-1)*$PartSize) $end = (($i)*$PartSize) - 1 if ($end -ge $inArray.count) {$end = $inArray.count -1} $outArray.Add(@($inArray[$start..$end])) } return ,$outArray } Function Invoke-LenovoWarrantyRESTAPI { [CmdletBinding()] param ( #Specifies the Lenovo serial number [Parameter(Mandatory = $true, Position = 0 )] [Alias('SN')] [string] $SerialNumber, [Parameter(Mandatory = $false)] [Alias('Model')] $Product = "" ) $url = "https://ibase.lenovo.com/POIRequest.aspx" $verb = "POST" $header = @{ "Content-Type" = "application/x-www-form-urlencoded" } $body = [xml]"<wiInputForm source='ibase'><id>LSC3</id><pw>IBA4LSC3</pw><product></product><serial></serial><wiOptions><machine/><parts/><service/><upma/><entitle/></wiOptions></wiInputForm>" $body = "xml=<wiInputForm source='ibase'><id>LSC3</id><pw>IBA4LSC3</pw><product>$Product</product><serial>$SerialNumber</serial><wiOptions><machine/><parts/><service/><upma/><entitle/></wiOptions></wiInputForm>" $response = Invoke-RestMethod -Method $verb -Uri $url -Body $body -Headers $header return $response } Function Get-LenovoWarrantyInfo { [CmdletBinding(DefaultParameterSetName="ByComputerName")] param ( #Specifies the Lenovo serial number [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ValueFromPipeline = $true, Position = 0, ParameterSetName="BySerialNumber")] [Alias('SN')] [string]$SerialNumber, #Lenovo Product Code for device being queried [Parameter(Mandatory = $false, ValueFromPipelineByPropertyName = $true, ValueFromPipeline = $true, Position = 1, ParameterSetName = "BySerialNumber")] [string] $Product, [Parameter(Mandatory = $false, ValueFromPipelineByPropertyName = $true, ValueFromPipeline = $true, Position = 0, ParameterSetName = "ByComputerName")] [string] $ComputerName, [Parameter(Mandatory = $false, ParameterSetName = "ByComputerName")] [System.Management.Automation.CredentialAttribute()] $Credential ) $RESTParams =@{} switch($PsCmdlet.ParameterSetName) { "BySerialNumber" { $RESTParams.Add("SerialNumber", $SerialNumber) if (!([string]::IsNullOrWhiteSpace($Product))) { $RESTParams.Add("Product", $Product) } } "ByComputerName" { # need to use WMI to lookup serial number and model number of device $args = @{ namespace = "root\cimv2" class = "Win32_SystemEnclosure" ErrorAction = "SilentlyContinue"} if (!([string]::IsNullOrEmpty($ComputerName))) { $args.Add("ComputerName", $ComputerName) } if (!([string]::IsNullOrEmpty($Credential))) { $args.Add("Credential", $Credential) } $result = Get-WmiObject @args if ($result -eq $null) { Write-Error "Unable to retrieve Serial Number from computer '$computername'" Exit } else { $RESTParams.Add("SerialNumber", ($result | Select-Object -ExpandProperty SerialNumber )) $args["Class"] = "Win32_ComputerSystem" $result = Get-WmiObject @args $Manufacturer = $result | Select-Object -ExpandProperty Manufacturer if ($Manufacturer -notmatch "Lenovo") { Write-Warning "Possibly not a Lenovo device" } else { $RESTParams.Add("Product", ($result | Select-Object -ExpandProperty Model )) } } } } $webresponse = Invoke-LenovoWarrantyRESTAPI @RESTParams if ($null -eq $webresponse) { Write-Error "REST API returned NULL" } else { #REST API returned data $properties = @{} if ($webresponse.SelectSingleNode("//serviceInfo")) { $properties.Add("ShipDate", ($webresponse.wiOutputForm.warrantyInfo.serviceInfo.shipDate | select -first 1)) $properties.Add("WarrantyStartDate", ($webresponse.wiOutputForm.warrantyInfo.serviceInfo.warstart | select -first 1)) $properties.Add("WarrantyEndDate", ($webresponse.wiOutputForm.warrantyInfo.serviceInfo.wed | select -last 1)) } else { $properties.Add("ShipDate", $null) $properties.Add("WarrantyStartDate", $null) $properties.Add("WarrantyEndDate", $null) } if ($webresponse.SelectSingleNode("//machineInfo")) { $properties.Add("Model", $webresponse.wiOutputForm.warrantyInfo.machineinfo.model) $properties.Add("Type", $webresponse.wiOutputForm.warrantyInfo.machineinfo.type) $properties.Add("Product", $webresponse.wiOutputForm.warrantyInfo.machineinfo.product) $properties.Add("SerialNumber", $webresponse.wiOutputForm.warrantyInfo.machineinfo.serial) } if ($webresponse.SelectSingleNode("//wiInputForm/xmlMessages")) { $errorMessage = $webresponse.wiInputForm.xmlMessages.xmlMessage | Where-Object {$_.type -eq "error"} if ( $errorMessage -ne $null ) { $properties.Add("ErrorNumber",($errorMessage.num)) $properties.Add("ErrorText", ($errorMessage.InnerText)) } } } $WarrantyInfo = New-Object psobject -Property $properties $WarrantyInfo } Function Invoke-DynabookWarrantyRESTAPI { [CmdletBinding()] param ( #Specifies the Lenovo serial number [Parameter(Mandatory = $true, Position = 0 )] [Alias('SN')] [string] $SerialNumber ) $sno=$SerialNumber $url = "https://support.dynabook.com/support/warrantyResults?sno="+$sno $verb = "GET" $header = @{ "Content-Type" = "application/application-json" } $response = Invoke-RestMethod -Method $verb -Uri $url -Headers $header return $response } Function Get-DynabookWarrantyInfo { [CmdletBinding(DefaultParameterSetName="ByComputerName")] param ( #Specifies the Dynabook serial number [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ValueFromPipeline = $true, Position = 0, ParameterSetName="BySerialNumber")] [Alias('SN')] [string]$SerialNumber ) $RESTParams =@{} switch($PsCmdlet.ParameterSetName) { "BySerialNumber" { $RESTParams.Add("SerialNumber", $SerialNumber) } } $webresponse = Invoke-DynabookWarrantyRESTAPI @RESTParams if ($null -eq $webresponse) { Write-Error "REST API returned NULL" } else { #REST API returned data $properties = @{} if ($webresponse.commonBean) { $properties.Add("ShipDate", ($webresponse.commonBean.shipDate)) $properties.Add("WarrantyStartDate", ($Webresponse.commonBean.customerPurchaseDate)) $properties.Add("WarrantyEndDate", ($Webresponse.commonBean.warrantyExpiryDate)) $properties.Add("Model", ($Webresponse.commonBean.modelFamily + " " + $Webresponse.commonBean.modelName)) $properties.Add("Type", ($Webresponse.commonBean.partNumber)) $properties.Add("Product", ($Webresponse.commonBean.modelName)) $properties.Add("SerialNumber", ($Webresponse.commonBean.serialNumber)) } else { $properties.Add("ShipDate", $null) $properties.Add("WarrantyStartDate", $null) $properties.Add("WarrantyEndDate", $null) } } $WarrantyInfo = New-Object psobject -Property $properties $WarrantyInfo } #Get-MSWarranty is based on https://github.com/KelvinTegelaar/PowerShellWarrantyReports by Kelvin Tegelaar function Get-MSAuth (){ [CmdletBinding(DefaultParameterSetName="ByComputerName")] param ( #Specifies the Dynabook serial number [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ValueFromPipeline = $true, Position = 0, ParameterSetName="BySerialNumber")] [Alias('SN')] [string]$SerialNumber ) $RESTParams =@{} switch($PsCmdlet.ParameterSetName) { "BySerialNumber" { $RESTParams.Add("SerialNumber", $SerialNumber) } } $body = ConvertTo-Json @{ sku = "Surface_" SerialNumber = $SerialNumber ForceRefresh = $false } $PublicKey = Invoke-RestMethod -Uri 'https://surfacewarrantyservice.azurewebsites.net/api/key' -Method Get $AesCSP = New-Object System.Security.Cryptography.AesCryptoServiceProvider $AesCSP.GenerateIV() $AesCSP.GenerateKey() $AESIVString = [System.Convert]::ToBase64String($AesCSP.IV) $AESKeyString = [System.Convert]::ToBase64String($AesCSP.Key) $AesKeyPair = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("$AESIVString,$AESKeyString")) $bodybytes = [System.Text.Encoding]::UTF8.GetBytes($body) $bodyenc = [System.Convert]::ToBase64String($AesCSP.CreateEncryptor().TransformFinalBlock($bodybytes, 0, $bodybytes.Length)) $RSA = New-Object System.Security.Cryptography.RSACryptoServiceProvider $RSA.ImportCspBlob([System.Convert]::FromBase64String($PublicKey)) $EncKey = [System.Convert]::ToBase64String($rsa.Encrypt([System.Text.Encoding]::UTF8.GetBytes($AesKeyPair), $false)) $FullBody = @{ Data = $bodyenc Key = $EncKey } | ConvertTo-Json write-debug $FullBody return $FullBody } function Get-MSWarrantyinfo{ [CmdletBinding(DefaultParameterSetName="ByComputerName")] param ( #Specifies the Dynabook serial number [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ValueFromPipeline = $true, Position = 0, ParameterSetName="BySerialNumber")] [Alias('SN')] [string]$SerialNumber ) $RESTParams =@{} switch($PsCmdlet.ParameterSetName) { "BySerialNumber" { $RESTParams.Add("SerialNumber", $SerialNumber) } } $today = Get-Date -Format yyyy-MM-dd $msAuth = Get-MSAuth $SerialNumber $warReq = Invoke-RestMethod -uri "https://surfacewarrantyservice.azurewebsites.net/api/v2/warranty" -Method POST -body $msAuth -ContentType "application/json" $warranty = $warReq $properties = @{} if ($WarReq.warranties) { $WarrantyState = foreach ($War in ($WarReq.warranties.effectiveenddate -split 'T')[0]) { if ($War -le $today) { "Expired" } else { "OK" } } $properties.Add("ShipDate", ($warranty.warranties.createDateTime)) $properties.Add("WarrantyStartDate", ($warranty.warranties.effectiveStartDate)) $properties.Add("WarrantyEndDate", ($warranty.warranties.effectiveEndDate)) $properties.Add("Model", ($warranty.device.title)) $properties.Add("Type", ($warranty.device.stockKeepingId)) $properties.Add("Product", ($warranty.device.deviceId.partId)) $properties.Add("SerialNumber", ($warranty.device.deviceId.serialNumber)) } else { $properties.Add("ShipDate", $null) $properties.Add("WarrantyStartDate", $null) $properties.Add("WarrantyEndDate", $null) } return $properties } Function Update-MissingMSWarranties { $ComputersMissingWarranty = Get-LabtechData -query "select ComputerID, BiosVer, (case WarrantyEnd when '0000-00-00 00:00:00' then '1979-01-01' else WarrantyEnd end) as 'WarrantyEnd' from computers where (biosmfg like 'Microsoft Corporation') and (biosname not like 'Virtual Machine') and (warrantyend = 0 or assetdate = 0)" Write-Host "Submitting $($ComputersMissingWarranty.Count) computers to Microsoft Warranty API: $(($ComputersMissingWarranty.BiosVer) -Join ",")" $ComputersMissingWarranty | %{ $WarrantyInfo = Get-MSWarrantyInfo -SerialNumber $_.BiosVer $WarrantyInfo | Add-Member -NotePropertyName "ComputerID" -NotePropertyValue $_.ComputerID $ComputerID = $_.Computerid if([String]::IsNullOrEmpty($warrantyinfo.WarrantyEndDate) -eq $false -and [String]::IsNullOrEmpty($WarrantyInfo.ShipDate) -eq $false) { $EndDate = [DateTime]::Parse($WarrantyInfo.WarrantyEndDate) $ShipDate = [DateTime]::Parse($WarrantyInfo.ShipDate) Update-WarrantyInLabTech -ComputerID $_.ComputerID -ShipDate $ShipDate -WarrantyEndDate $EndDate } else { Write-Host "Microsoft response missing data for Serial Number: $($_.BiosVer) ShipDate: $($WarrantyInfo.ShipDate) EndDate: $($WarrantInfo.WarrantyEndDate)" } } } Function Get-DellWarrantyInfo { Param( [Parameter( Mandatory = $true, ParameterSetName = '', ValueFromPipeline = $true)] [Array]$ServiceTags, [Parameter( Mandatory = $true, ParameterSetName = '', ValueFromPipeline = $true)] [Array]$AccessToken ) $AuthHeader = @{Authorization="Bearer $AccessToken"} $JobResponse = Invoke-RestMethod -Method Get -Uri "https://apigtwb2c.us.dell.com/PROD/sbil/eapi/v5/asset-entitlements?servicetags=$ServiceTags" -headers $AuthHeader -ContentType 'application/json' $AllComputerWarranties = $JobResponse | ?{ $_.entitlements } | %{ $ThisComputerApiResponse = $_ $ShipDate = $ThisComputerApiResponse.shipDate $ThisComputerWarranties = $ThisComputerApiResponse.entitlements | ?{ $_.ServiceLevelCode -notlike "D" } $WarrantyStart = $ThisComputerWarranties | sort startDate | Select -First 1 -ExpandProperty startDate $WarrantyEnd = $ThisComputerWarranties | sort EndDate | Select -Last 1 -ExpandProperty endDate if(-not [String]::IsNullOrEmpty($ShipDate) -and -not [String]::IsNullOrEmpty($WarrantyEnd)) { New-Object psobject -Property @{"WarrantyEndDate"=[DateTime]::Parse($WarrantyEnd.SubString(0,10));"ShipDate"=[DateTime]::Parse($ShipDate.SubString(0,10));"SerialNumber"=$_.ServiceTag} } else { Write-Warning "Invalid Warranty Info received for ServiceTag: $($ThisComputerApiResponse.ServiceTag) ShipDate: $ShipDate WarrantyEnd: $WarrantyEnd `r`n$($ThisComputerWarranties)" } } $AllComputerWarranties } Function Update-WarrantyInLabTech { Param( [Parameter( Mandatory = $true, ParameterSetName = '', ValueFromPipeline = $true)] $ComputerID, [Parameter( Mandatory = $true, ParameterSetName = '', ValueFromPipeline = $true)] [DateTime]$ShipDate, [Parameter( Mandatory = $true, ParameterSetName = '', ValueFromPipeline = $true)] [DateTime]$WarrantyEndDate ) try { Write-Output "Updating ComputerID: $ComputerID ShipDate: $ShipDate EndDate: $WarrantyEndDate" Assert-LabtechQuery -query "update Computers set WarrantyEnd='$($WarrantyEndDate.ToString("yyyy-MM-dd"))', AssetDate='$($ShipDate.ToString("yyyy-MM-dd"))' where ComputerID=$ComputerID;" | Out-Null } catch { $_ } } Function Update-MissingDellWarranties { Param( [Parameter( Mandatory = $true, ParameterSetName = '', ValueFromPipeline = $true)] [string]$DellClientId, [Parameter( Mandatory = $true, ParameterSetName = '', ValueFromPipeline = $true)] [string]$DellClientSecret ) $ComputersMissingWarranty = Get-LabtechData -Query "select ComputerID, BiosVer, (case WarrantyEnd when '0000-00-00 00:00:00' then '1979-01-01' else WarrantyEnd end) as 'WarrantyEnd' from computers where BiosMFG = 'Dell' and length(trim(BiosVer)) = 7 and (WarrantyEnd='0000-00-00 00:00:00' or assetdate > WarrantyEnd)" if($ComputersMissingWarranty.Count -eq 0) { "No Dell computers missing warranty" return } $uri = "https://apigtwb2c.us.dell.com/auth/oauth/v2/token" if(-not $AccessToken) { $AuthResponse = Invoke-RestMethod -Method Post -Uri $uri -Body "client_id=$DellClientID&client_secret=$DellClientSecret&grant_type=client_credentials" -ContentType "application/x-www-form-urlencoded" if(-not $AuthResponse) { "Dell API timed out while obtaining access token. Plese try again later" return } $AccessToken = $AuthResponse | select -ExpandProperty access_token } Write-Host "AccessToken: $AccessToken" $Chunks = Split-Array -inArray $ComputersMissingWarranty -size 100 foreach($Chunk in $Chunks){ $WarrantyInfoArray = @() $WarrantyInfoArray += Get-DellWarrantyInfo -ServiceTags $($Chunk.BiosVer -join ',') -AccessToken $AccessToken $WarrantyInfoArray | %{ $WarrantyInfo = $_ $ComputerID = $ComputersMissingWarranty | ?{$_.biosver -like $WarrantyInfo.SerialNumber} | select -first 1 -ExpandProperty ComputerID Update-WarrantyInLabTech -ComputerID $ComputerID -ShipDate $WarrantyInfo.ShipDate -WarrantyEndDate $WarrantyInfo.WarrantyEndDate } } } Function Update-MissingLenovoWarranties { Param( [Parameter( Mandatory = $false, ParameterSetName = '', ValueFromPipeline = $true)] [string]$LenovoAPIKey ) $ComputersMissingWarranty = Get-LabtechData -query "select ComputerID, BiosVer, (case WarrantyEnd when '0000-00-00 00:00:00' then '1979-01-01' else WarrantyEnd end) as 'WarrantyEnd' from computers where biosmfg like 'lenovo' and (warrantyend = 0 or assetdate = 0)" Write-Host "Submitting $($ComputersMissingWarranty.Count) computers to Lenovo API: $(($ComputersMissingWarranty.BiosVer) -Join ",")" #$info = Get-LenovoWarrantyInfo -SerialNumber '1045680901618' -Product 20428 #$LenovoWarrantyInfo = @(); $ComputersMissingWarranty | %{ $WarrantyInfo = Get-LenovoWarrantyInfo -SerialNumber $_.BiosVer -Product $_.BiosName $WarrantyInfo | Add-Member -NotePropertyName "ComputerID" -NotePropertyValue $_.ComputerID $ComputerID = $_.Computerid if([String]::IsNullOrEmpty($warrantyinfo.WarrantyEndDate) -eq $false -and [String]::IsNullOrEmpty($WarrantyInfo.ShipDate) -eq $false) { $EndDate = [DateTime]::Parse($WarrantyInfo.WarrantyEndDate) $ShipDate = [DateTime]::Parse($WarrantyInfo.ShipDate) Update-WarrantyInLabTech -ComputerID $_.ComputerID -ShipDate $ShipDate -WarrantyEndDate $EndDate } else { Write-Host "Lenovo response missing data for Serial Number: $($_.BiosVer) ShipDate: $($WarrantyInfo.ShipDate) EndDate: $($WarrantInfo.WarrantyEndDate)" } } } Function Update-MissingHPWarranties { $HPComputers = Get-LabtechData -query "select ComputerID, BiosVer sn, (case WarrantyEnd when '0000-00-00 00:00:00' then '1979-01-01' else WarrantyEnd end) as 'WarrantyEnd', inv_chassis.SKUNumber pn from computers join inv_chassis using(computerid) where BiosMFG like 'h%p%' and (WarrantyEnd='0000-00-00 00:00:00' or assetdate > WarrantyEnd)" "$($HPComputers.Count) HP computers found in need of warranty information" for($i=0;$i -lt $HPComputers.Count;$i++) { $WarrantyInfo = Get-HPIncWarrantyEntitlement -SerialNumber $HPComputers[$i].sn -ProductNumber $HPComputers[$i].pn if($WarrantyInfo.OverallEntitlementStartDate -ne $null) { try { if(($WarrantyInfo.OverallEntitlementEndDate | Measure-Object).Count -gt 1) { $end = $([DateTime]::Parse($WarrantyInfo.OverallEntitlementEndDate[0])) }else{ $end = $([DateTime]::Parse($WarrantyInfo.OverallEntitlementEndDate)) } if(($WarrantyInfo.OverallEntitlementStartDate | Measure-Object).Count -gt 1) { $start = $([DateTime]::Parse($WarrantyInfo.OverallEntitlementStartDate[0])) }else{ $start = $([DateTime]::Parse($WarrantyInfo.OverallEntitlementStartDate)) } Update-WarrantyInLabTech -ComputerID $HPComputers[$i].ComputerID -ShipDate $start -WarrantyEndDate $end -ErrorAction Stop } catch { Write-Output "Error updating $($HPComputers[$i].ComputerID): End date: $end" } } else { Write-Output "No Warranty Info returned for $($HPComputers[$i].ComputerID)" } } } Function Update-MissingDynabookWarranties { $ComputersMissingWarranty = Get-LabtechData -query "select ComputerID, BiosVer, (case WarrantyEnd when '0000-00-00 00:00:00' then '1979-01-01' else WarrantyEnd end) as 'WarrantyEnd' from computers where (biosmfg like 'toshiba' or biosmfg like 'Dynabook Inc.') and (warrantyend = 0 or assetdate = 0)" Write-Host "Submitting $($ComputersMissingWarranty.Count) computers to Dynabook API: $(($ComputersMissingWarranty.BiosVer) -Join ",")" $ComputersMissingWarranty | %{ $WarrantyInfo = Get-DynabookWarrantyInfo -SerialNumber $_.BiosVer $WarrantyInfo | Add-Member -NotePropertyName "ComputerID" -NotePropertyValue $_.ComputerID $ComputerID = $_.Computerid if([String]::IsNullOrEmpty($warrantyinfo.WarrantyEndDate) -eq $false -and [String]::IsNullOrEmpty($WarrantyInfo.ShipDate) -eq $false) { $EndDate = [DateTime]::Parse($WarrantyInfo.WarrantyEndDate) $ShipDate = [DateTime]::Parse($WarrantyInfo.ShipDate) Update-WarrantyInLabTech -ComputerID $_.ComputerID -ShipDate $ShipDate -WarrantyEndDate $EndDate } else { Write-Host "Dynabook response missing data for Serial Number: $($_.BiosVer) ShipDate: $($WarrantyInfo.ShipDate) EndDate: $($WarrantInfo.WarrantyEndDate)" } } } $DellClientId = 'DellClientID' $DellClientSecret = 'DellClientSecret' Write-Host "Trimming SerialNumbers" Assert-LabtechQuery "update computers set BiosVer=trim(BiosVer) where BiosVer like ' %' or BiosVer like '% '" | out-null Write-Host "Updating Dell Warranties" Update-MissingDellWarranties -DellClientId $DellClientId -DellClientSecret $DellClientSecret Write-Host "Updating Lenovo Warranties" Update-MissingLenovoWarranties Write-Host "Updating HP Warranties" Update-MissingHPWarranties Write-Host "Updating Dynabook/Toshiba Warranties" Update-MissingDynabookWarranties Write-Host "Updating Microsoft Corporation Warranties" Update-MissingMSWarranties
×
×
  • Create New...