'Modified Sept 20 2012
on error resume next
Const URL = "http://xserv.dell.com/services/assetservice.asmx"
Const nsURL = "http://support.dell.com/WebServices/"
Dim oHttp
Dim strResult
Dim strSoapReq
DEBUGGING = FALSE
'Get the service tag of the computer
Set objSWbemServices = GetObject("winmgmts:\\.\root\cimv2")
' read serial number from WMI
Set colSWbemObjectSet = objSWbemServices.ExecQuery("SELECT * FROM win32_bios")
For Each objSWbemObject In colSWbemObjectSet
strServicetag = objSWbemObject.SerialNumber
Next
'Prepare the WMI object
Dim wbemCimtypeSint16
Dim wbemCimtypeSint32
Dim wbemCimtypeReal32
Dim wbemCimtypeReal64
Dim wbemCimtypeString
Dim wbemCimtypeBoolean
Dim wbemCimtypeObject
Dim wbemCimtypeSint8
Dim wbemCimtypeUint8
Dim wbemCimtypeUint16
Dim wbemCimtypeUint32
Dim wbemCimtypeSint64
Dim wbemCimtypeUint64
Dim wbemCimtypeDateTime
Dim wbemCimtypeReference
Dim wbemCimtypeChar16
wbemCimtypeSint16 = 2
wbemCimtypeSint32 = 3
wbemCimtypeReal32 = 4
wbemCimtypeReal64 = 5
wbemCimtypeString = 8
wbemCimtypeBoolean = 11
wbemCimtypeObject = 13
wbemCimtypeSint8 = 16
wbemCimtypeUint8 = 17
wbemCimtypeUint16 = 18
wbemCimtypeUint32 = 19
wbemCimtypeSint64 = 20
wbemCimtypeUint64 = 21
wbemCimtypeDateTime = 101
wbemCimtypeReference = 102
wbemCimtypeChar16 = 103
Set oLocation = CreateObject("WbemScripting.SWbemLocator")
'Remove classes
Set oServices = oLocation.ConnectServer(, "root\cimv2")
Set oNewObject = oServices.Get("Warranty_Info")
oNewObject.Delete_
Set oServices = oLocation.ConnectServer(, "root\cimv2\SMS")
set oNewObject = oServices.Get("Warranty_Info")
oNewObject.Delete_
'Create data class structure
Set oServices = oLocation.ConnectServer(, "root\cimv2")
Set oDataObject = oServices.Get
oDataObject.Path_.Class = "Warranty_Info"
oDataObject.Properties_.add "DateScriptRan", wbemCimtypeString
oDataObject.Properties_.add "ServiceTag", wbemCimtypeString
oDataObject.Properties_.add "SystemType", wbemCimtypeString
oDataObject.Properties_.add "ShipDate", wbemCimtypeString
oDataObject.Properties_.add "Provider", wbemCimtypeString
oDataObject.Properties_.add "WarrantyExtension", wbemCimtypeString
oDataObject.Properties_.add "DellIBU", wbemCimtypeString
oDataObject.Properties_.add "Description", wbemCimtypeString
oDataObject.Properties_.add "StartDate", wbemCimtypeString
oDataObject.Properties_.add "EndDate", wbemCimtypeString
oDataObject.Properties_.add "DaysLeft", wbemCimtypeUint32
oDataObject.Properties_("Description").Qualifiers_.add "key", True
oDataObject.Put_
' Create the http request text
strSoapReq = GenerateSoapBodyStart()
strSoapReq = strSoapReq + GenerateSoapFunctionCallStart("GetAssetInformation")
strSoapReq = strSoapReq + GenerateSoapParameter("guid",
"11111111-1111-1111-1111-111111111111")
strSoapReq = strSoapReq + GenerateSoapParameter("applicationName", "Dell
Warrenty Script")
strSoapReq = strSoapReq + GenerateSoapParameter("serviceTags", strServiceTag)
strSoapReq = strSoapReq + GenerateSoapFunctionCallEnd("GetAssetInformation")
strSoapReq = strSoapReq + GenerateSoapBodyEnd()
Set oHttp = CreateObject("Msxml2.XMLHTTP")
'Call the webservice
oHttp.open "POST", URL, false
oHttp.setRequestHeader "Content-Type", "text/xml"
'oHttp.setRequestHeader "SOAPAction", URL + "/GetAssetInformation"
oHttp.send strSoapReq
strResult = oHttp.responseText
strDateRan = Now
strServiceTag = GetAssetHeaderData(strResult, "ServiceTag")
strSystemType = GetAssetHeaderData(strResult, "SystemType") & " " &
GetAssetHeaderData(strResult, "SystemModel")
strShipDate = GetAssetHeaderData(strResult, "SystemShipDate")
If Instr(strShipDate,"T") > 0 then
strShipDate =
DateValue(LEFT(strShipDate,INSTR(strShipDate,"T")-1))
End If
strDellIBU = GetAssetHeaderData(strResult, "Buid")
Set oEntitlements= GetEntitlements (strResult)
for each oEntitlement in oEntitlements
strStartDate = replace
(oEntitlement.SelectSingleNode("StartDate").text, "T", " ")
strDescription =
oEntitlement.SelectSingleNode("ServiceLevelDescription").text
strProvider = oEntitlement.SelectSingleNode("Provider").text
strWarrantyExtension = 0
strEndDate = replace
(oEntitlement.SelectSingleNode("EndDate").text, "T", " ")
strDaysLeft = oEntitlement.SelectSingleNode("DaysLeft").text
If DEBUGGING=TRUE Then
Wscript.echo "DateRan " & strDateRan & vbcrlf &_
" ServiceTag:" & strServiceTag & vbcrlf &_
" SystemType: " & strSystemType & vbcrlf &_
" DellIBU:" & strDellIBU & vbcrlf &_
" ShipDate:" & strShipDate & vbcrlf &_
" Desc:" & strDescription & VbCrLf &_
" Provider:" & strProvider & VbCrLf &_
" Warr:" & strWarrantyExtension & VbCrLf &_
" Start:" & strStartDate & VbCrLf &_
" End:" & strEndDate & VbCrLf &_
" Left:" & strDaysLeft
End If
'Check if a line already has been inserted for the warranty
type description and merge the data.
strQuery = "Select * FROM Warranty_Info WHERE Description LIKE
'" & strDescription &"'"
set oExistingItem = oServices.ExecQuery (strQuery)
For Each oItem in oExistingItem
' take the earliest start date
If DateValue(strStartDate) >
DateValue(oItem.StartDate) then strStartDate = oItem.StartDate
'take the last end date
If DateValue(strEndDate) <
DateValue(oItem.EndDate) then strEndDate = oItem.EndDate
'if the date rages don't overlap them add the
days left together
If DateValue(strStartDate) <>
DateValue(oItem.StartDate) then strDaysLeft = strDaysLeft + oItem.DaysLeft
Next
strStartDate = DateValue(strStartDate)
strEndDate = DateValue(strEndDate)
If instr(strStartdate,"-") <> 0 then strStartDate =
MMDDYYYY(strStartDate)
If instr(strEndDate,"-") <> 0 then strEndDate =
MMDDYYYY(strEndDate)
If instr(strDateRan,"-") <> 0 then strDateRan =
MMDDYYYY(strDateRan)
If instr(strShipDate,"-") <> 0 then strShipDate =
MMDDYYYY(strShipDate)
If strDescription <> "" then
Set oNewObject =
oServices.Get("Warranty_Info").SpawnInstance_
oNewObject.DateScriptRan = strDateRan
oNewObject.ServiceTag = strServiceTag
oNewObject.SystemType = strSystemType
oNewObject.ShipDate = strShipDate
oNewObject.Provider = strProvider
oNewObject.WarrantyExtension =
strWarrantyExtension
oNewObject.DellIBU = strDellIBU
oNewObject.Description = strDescription
oNewObject.StartDate = strStartDate
oNewObject.EndDate = strEndDate
oNewObject.DaysLeft = strDaysLeft
oNewObject.Put_
End If
Next
'Create reporting class structure
Set oServices = oLocation.ConnectServer(, "root\cimv2\SMS")
Set oRptObject = oServices.Get("SMS_Class_Template").SpawnDerivedClass_
'Set Class Name and Qualifiers
oRptObject.Path_.Class = "Warranty_Info"
oRptObject.Qualifiers_.Add "SMS_Report", True
oRptObject.Qualifiers_.Add "SMS_Group_Name", "Warranty Info"
oRptObject.Qualifiers_.Add "SMS_Class_ID", "CUSTOM|Warranty_Info|2.3"
oRptObject.Properties_.Add("DateScriptRan", wbemCimtypeString).Qualifiers_.Add
"SMS_Report", True
oRptObject.Properties_.Add("ServiceTag", wbemCimtypeString).Qualifiers_.Add
"SMS_Report", True
oRptObject.Properties_.Add("SystemType", wbemCimtypeString).Qualifiers_.Add
"SMS_Report", True
oRptObject.Properties_.Add("ShipDate", wbemCimtypeString).Qualifiers_.Add
"SMS_Report", True
oRptObject.Properties_.Add("Provider", wbemCimtypeString).Qualifiers_.Add
"SMS_Report", True
oRptObject.Properties_.Add("WarrantyExtension",
wbemCimtypeString).Qualifiers_.Add "SMS_Report", True
oRptObject.Properties_.Add("DellIBU", wbemCimtypeString).Qualifiers_.Add
"SMS_Report", True
oRptObject.Properties_.Add("Description", wbemCimtypeString).Qualifiers_.Add
"SMS_Report", True
oRptObject.Properties_.Add("StartDate", wbemCimtypeString).Qualifiers_.Add
"SMS_Report", True
oRptObject.Properties_.Add("EndDate", wbemCimtypeString).Qualifiers_.Add
"SMS_Report", True
oRptObject.Properties_.Add("DaysLeft", wbemCimtypeUint32).Qualifiers_.Add
"SMS_Report", True
oRptObject.Put_
wscript.quit
Function GetAssetHeaderData(byval responseText, byval resultParam)
Dim oXml
Dim strPath
Dim oNode
Set oXml = CreateObject("Msxml2.DOMDocument")
oXml.Async = true
oXml.LoadXml responseText
strPath = "/*/*/*/*/*/AssetHeaderData/" + resultParam
Set oNode = oXml.documentElement.SelectSingleNode(strPath)
GetAssetHeaderData = oNode.Text
End Function
Function GetEntitlements(byval responseText)
Dim oXml
Dim strPath
Set oXml = CreateObject("Msxml2.DOMDocument")
oXml.Async = true
oXml.LoadXml responseText
strPath = "/*/*/*/*/*/Entitlements/EntitlementData"
Set GetEntitlements = oXml.documentElement.SelectNodes(strPath)
'GetEntitlements = aEntitlements
End Function
Function GenerateSoapBodyStart()
Dim strSoap
strSoap = "<?xml version=""1.0"" encoding=""utf-8""?>"
strSoap = strSoap + "<soap12:Envelope "
strSoap = strSoap +
"xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" "
strSoap = strSoap + "xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" "
strSoap = strSoap +
"xmlns:soap12=""http://www.w3.org/2003/05/soap-envelope""> "
strSoap = strSoap + "<soap12:Body>"
GenerateSoapBodyStart = strSoap
End Function
Function GenerateSoapBodyEnd()
Dim strSoap
strSoap = "</soap12:Body>"
strSoap = strSoap + "</soap12:Envelope>"
GenerateSoapBodyEnd = strSoap
End Function
Function GenerateSoapFunctionCallStart(byval strFunction)
Dim strSoap
strSoap = "<" + strFunction + " xmlns=""" + nsUrl + """>"
GenerateSoapFunctionCallStart = strSoap
End Function
Function GenerateSoapFunctionCallEnd(byval strFunction)
Dim strSoap
strSoap = "</" + strFunction + ">"
GenerateSoapFunctionCallEnd = strSoap
End Function
Function GenerateSoapParameter(byval strParam, byval strValue)
Dim strSoap
strSoap = "<" + strParam + ">"
strSoap = strSoap + strValue
strSoap = strSoap + "</" + strParam + ">"
GenerateSoapParameter = strSoap
End Function
function mmddyyyy(varDate)
mmddyyyy = Month(DateValue(varDate)) & "/" &
Day(DateValue(varDate)) & "/" & Year(DateValue(varDate))
end function
________________________________
John Marcum
MCITP, MCTS, MCSA
Desktop Architect
Bradley Arant Boult Cummings LLP
________________________________
[H_Logo]
From: [email protected] [mailto:[email protected]] On
Behalf Of Denzik, Josh
Sent: Tuesday, January 5, 2016 2:37 PM
To: [email protected]; [email protected]
Subject: [mssms] RE: New Dell Command | Integration Suite for System Center 2012
John,
I have been able to find very little documentation on how to use the warranty
tool from dell to get info out of our ConfigMgr database what community driven
tools do you use for the dell warranty stuff?
-Josh
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Marcum, John
Sent: Tuesday, January 5, 2016 2:41 PM
To: [email protected]<mailto:[email protected]>;
[email protected]<mailto:[email protected]>
Subject: [mssms] RE: New Dell Command | Integration Suite for System Center 2012
Personally I found the community driven warranty stuff better than the actual
Dell warranty stuff. Of course after a call with CSS a couple weeks ago I've
also stopped using the Dell cabs. :(
________________________________
John Marcum
MCITP, MCTS, MCSA
Desktop Architect
Bradley Arant Boult Cummings LLP
________________________________
[H_Logo]
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Denzik, Josh
Sent: Tuesday, January 5, 2016 1:23 PM
To: [email protected]<mailto:[email protected]>;
[email protected]<mailto:[email protected]>
Subject: [mssms] RE: New Dell Command | Integration Suite for System Center 2012
Is there documentation on how to setup the warranty stuff?
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Giroux, Eric J
Sent: Tuesday, January 5, 2016 12:46 PM
To: [email protected]<mailto:[email protected]>;
[email protected]<mailto:[email protected]>
Subject: [MDT-OSD] RE: New Dell Command | Integration Suite for System Center
2012
Does the 4.1 update fix the issue with some functionality not working when
running from admin console on a workstation? I had an open case on this last
year. The Command Configure BIOS package import would only work running the
console on the site server as admin.
Thanks,
Eric
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of
[email protected]<mailto:[email protected]>
Sent: Tuesday, January 5, 2016 10:10 AM
To: [email protected]<mailto:[email protected]>;
[email protected]<mailto:[email protected]>
Subject: [MDT-OSD] New Dell Command | Integration Suite for System Center 2012
This message originated outside of Unum. Use caution when opening attachments,
clicking links or responding to requests for information.
Dell - Internal Use - Confidential
If you saw our demo at Ignite or MMS on automating all of your OSD drivers from
within the SCCM console and are wondering when it will be available. It's
here.
http://en.community.dell.com/techcenter/enterprise-client/w/wiki/7533.dell-command-integration-suite-for-system-center
As always, let me know what you love, hate, want changed, etc.
Thanks,
Warren Byle
Dell | Business Client Systems Management
Product Manager
office +1 512 724 2626
[email protected]<mailto:[email protected]>
Client Command Suite<http://dell.com/command>
Join the conversation
Twitter: WarrenByle<http://twitter.com/WarrenByle>
________________________________
Confidentiality Notice: This e-mail is from a law firm and may be protected by
the attorney-client or work product privileges. If you have received this
message in error, please notify the sender by replying to this e-mail and then
delete it from your computer.