Asset Age
Hello,
I have been given the task to find machines that are over 5 years old within our organization. We are a Dell shop and I was wondering if I could make a report that would show me systems over a certain age. Can this be done?
Thank you.
I have been given the task to find machines that are over 5 years old within our organization. We are a Dell shop and I was wondering if I could make a report that would show me systems over a certain age. Can this be done?
Thank you.
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
scottlutz
13 years ago
Posted by:
GillySpy
13 years ago
Do all the machines have dell warranty info posted? If so does the oldest date posted for that represent when it was first deployed?
Is there anything (file, etc) that you put on the system (during imaging or setup) that would be timestamped?
The OS installdate can be obtained. I googled and modified the code here to come up with:
The running cscript installdate.vbs //Nologo
yeilds something that's easy to read and could be put into a custom inventory field and in a date format mysql will be cool with.
Is there anything (file, etc) that you put on the system (during imaging or setup) that would be timestamped?
The OS installdate can be obtained. I googled and modified the code here to come up with:
strComputer = "."
Set dtmInstallDate = CreateObject( _
"WbemScripting.SWbemDateTime")
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
Wscript.echo("Install Date: " & getmydat (objOperatingSystem.InstallDate))
Next
Function getmydat(wmitime)
dtmInstallDate.Value = wmitime
getmydat = fnConvertToMySQLDate(dtmInstallDate.GetVarDate)
End function
Function fnConvertToMySQLDate(varDate)
Dim sDay,sMonth
If day(varDate) < 10 Then
sDay = "0" & day(varDate)
else
sDay = day(varDate)
end if
If month(varDate) < 10 Then
sMonth = "0" & month(varDate)
Else
sMonth = month(varDate)
End If
fnConvertToMySQLDate = year(varDate) & "-" & sMonth & "-" & sDay & " "& hour(varDate) & "-" & minute(varDate) & "-" & second(varDate)
End Function
The running cscript installdate.vbs //Nologo
yeilds something that's easy to read and could be put into a custom inventory field and in a date format mysql will be cool with.
Posted by:
cmccracken
13 years ago
I needed something similar and used Ship Date. To create mine, I started with the Dell Expired Warranty report and customized it.
I ended up with:
Casey
I ended up with:
SELECT M.NAME AS MACHINE_NAME, M.CS_MODEL AS MODEL, DA.SERVICE_TAG, DA.SHIP_DATE,M.USER_LOGGED AS LAST_LOGGED_IN_USER FROM KBSYS.DELL_ASSET DA LEFT JOIN MACHINE M ON (M.BIOS_SERIAL_NUMBER = DA.PARENT_SERVICE_TAG OR M.BIOS_SERIAL_NUMBER = DA.SERVICE_TAG)
WHERE M.CS_MANUFACTURER LIKE '%dell%'
AND M.BIOS_SERIAL_NUMBER!='
AND DA.DISABLED != 1
ORDER BY DA.SHIP_DATE;
Casey
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.