Page 1 of 1 1
Topic Options
#145082 - 2005-08-09 04:22 PM Computer date
ohenrikh Offline
Fresh Scripter

Registered: 2003-03-05
Posts: 6
Hello
I like to make a script hwo tell me when the computer is created.
Someone hwo can tell me how?

Thanks for help
_________________________
------ mailto:oHenrikH@frisurf.no

Top
#145083 - 2005-08-09 04:37 PM Re: Computer date
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Code:
  
$strComputer = "."
$objWMIService = GetObject("winmgmts:\\" + $strComputer + "\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
For Each $objItem in $colItems
? "ReleaseDate: " + $objItem.ReleaseDate
Next



Gives you the Bios date...
_________________________
Co


Top
#145084 - 2005-08-09 04:48 PM Re: Computer date
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Why do you need this date? Is it because you want to change old computers with new ones?

In that case it is better to know the processor, memory and HDD because the BIOS date will be changed after a BIOS update...
_________________________
Co


Top
#145085 - 2005-08-10 09:04 AM Re: Computer date
ohenrikh Offline
Fresh Scripter

Registered: 2003-03-05
Posts: 6
I want to change all my computers who I have bought in year 2003 and I want to know how many I have.
not the prosessor capasity
_________________________
------ mailto:oHenrikH@frisurf.no

Top
#145086 - 2005-08-10 08:47 PM Re: Computer date
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Well if you never have updated the Bios of your pc's you can use the bios date but it isn't very exact... Don't you have a CMDB in which it is archived??
_________________________
Co


Top
#145087 - 2005-08-10 09:38 PM Re: Computer date
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
If you're not Imaging your systems with something like Ghost you could also maybe check the date that the OS was installed. The BIOS would probably be a better choice though for age unless it was TOO old in which case often it might not return the data.

The OSID UDF from Jens has the date the OS was installed in it you could use or grab the code how to get the date.

Top
#145088 - 2005-08-15 03:21 AM Re: Computer date
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Or one would check one's purchase requisitions to get a count and make/model. Just becasue a compuer was purchased i 2003 doesn't mean the OS dat will be 2003. Get the serial numbers for all computers and check your vendor's online support date lists to identify those bought in 2003.

Edited by sealeopard (2005-08-15 03:23 AM)
_________________________
There are two types of vessels, submarines and targets.

Top
#145089 - 2005-08-15 07:22 PM Re: Computer date
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Very optomistic about those records Jens. I agree that it should be way easy to do, but reality sets in and often one finds that it's quite impossible for many shops to do such an easy task and would take longer audits of there records to come up with the needed data. That said, yes doing better record keeping should be in order but doubt it will happen for most and is beyond the scope of most IT Admins.

As well, it depends on what accuracy one is looking for too. One could buy computers that are maybe a year old already from some vendors as some shops buy used and not new computers to keep costs down.

WMI is probably your best bet without doing a physical inventory.

Top
#145090 - 2005-08-15 08:53 PM Re: Computer date
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
HP (the part that has been known as Compaq) has got the serials and the dates online but these are production dates. Actual purchasing dates can be weeks or even months later then production date.

I agree WMI and the BIOS date are probably most reliable in this case.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#145091 - 2005-08-15 09:03 PM Re: Computer date
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
hmmm, Good example why an up-to-date CMDB is very handy...
_________________________
Co


Top
#145092 - 2005-08-15 09:56 PM Re: Computer date
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Yeah.
We used to keep it up to date each time one or more new machines went into production use or got taken out of production use at my former office. Just put the date it went into service, serial number, type, department, location and so on in a DB this way you can always keep track of the machines.

Afaik there is no way you can actually see when a machine is purchased, at least not using a script because this date is not to be found in the machines hard or software but in the invoices folder at your finance department.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#145093 - 2005-08-15 10:11 PM Re: Computer date
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Quote:

I want to change all my computers who I have bought in year 2003 and I want to know how many I have...




Mart,

He wants to know when a machine was bought... If he is using an up-to-date CMDB he can find it by a simple query...

If he don't have one the BIOS date is probably the best option. Or you have to know which type of processors are manufactured in 2003...
_________________________
Co


Top
#145094 - 2005-08-15 10:37 PM Re: Computer date
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Well that is just what I said.
A machines goes into production use little time after is ahs been purchased (it does in my situation). Otherwise maybe it's an option to create a special status in the DB like "To be used later" or "Spare system" for not yet into production systems and something like "Active" or "In use" for already in production systems. All data will be present then.

Quote:


If he don't have one the BIOS date is probably the best option.





Like said in a post above this only works if the BIOS has never been updated or the motherboard has never been replaced.


Edited by Mart (2005-08-15 10:38 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#145095 - 2005-08-15 10:46 PM Re: Computer date
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Quote:

Afaik there is no way you can actually see when a machine is purchased




You are right if you meant to get it by script...the CMDB should contain this info...
_________________________
Co


Top
#145096 - 2005-08-15 10:48 PM Re: Computer date
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
MMM, This is turning into an endless discussion...
_________________________
Co


Top
#145097 - 2005-08-15 11:22 PM Re: Computer date
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Yep, lets quit. I think ohenrikh got the info he asked for. Not the most desirable answer but heee sometimes being a sysadmin s#cks
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#145098 - 2005-08-15 11:23 PM Re: Computer date
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Yeh, I know
_________________________
Co


Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 699 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.073 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org