Monthly Archives: February 2015

How old are your computers ?

Lately I have been asked “Can you use ConfigMgr to see how old our computers are”.

And the answer is: YES with some modifications/limitations, and it only works if you haven’t deleted the computer object in the Active Directory every time you re-install your computers.

Step one:
Add the Active Directory attribute “whenCreated” to the Active Directory System Discovery.Add Attribute

Use the Custom button.
Add Attribute Custom

Step two:
Run a discovery and you will get a new attribute on the device object.Client01

Now you can use this attribute in collections or reports to get a good picture on how many computers that might need to be replaced during the following years.

In the sample query below I select computers that are 2 -3 years old.Query 2-3

And the query in a text box :)

 

And here is a sample picture how I use this information in a custom report.
Report year

This is just a way to get a hint on the age of your computers. It’s not as accurate as looking in to invoices and so on.

 

Have a nice day
Johnny

Cleanup the IIS logs on a ConfigMgr Server

If you have installed a ConfigMgr on a server a few years ago there might be a lot of IIS log files stored on the C drive (if you used the default settings when installing the IIS). In the sample picture it’s been 246 days since the installation and each log file is about 8-20 MB depending on the traffic to the IIS server. In time this can become a problem.

Logfiles IIS

Copy the syntax below and paste it into an elevated command prompt and hit enter.

So now there is a new scheduled job created in Task Scheduler that clears the IIS log directory from files that are 30 days and older. The location where the log directory is located on the server is automatically found out by the PowerShell command.

This will free up some space on C: drive next Sunday at 01:00 or directly if you run the task manually.
.

Cleanup Task

 

Have a nice day
Johnny