Active Directory 2012

Active Directory – Get Last logon using Powershell

During an Active Directory migration, I needed to do an inventory of the computers to migrate. Because some computers do not exist anymore but not removed from Active Directory. I created a Powershell script based on the Last Logon Timestamp property.

CSV file from the script

CSV file from the script

This powershell script creates a CSV file with the computer name, the last logon property and the operating system. Some domains were based on Windows Server 2003 or 2008, I could not use Active Directory commandlets, so I used the LDAP Search.

Continue reading

SCCM

SCCM 2012 – Set Inactive Client delay

Using System Center Configuration Manager on a wide computer scope can result in unexpected or untrue reporting.  For example, some computers can be off for a long time or an administrator has removed it from managed computers, they are inactive clients.

When you deploy an Application or Software Updates with SCCM 2012, some reports can be totally wrong, they don’t reflect the reality, if a lot of computer are no more managed but still exist in SCCM.

To workaround this, Microsoft introduced the Inactive Client property. SCCM Client gets and puts information to the management point and if it doesn’t report for a number of days, it will be set as Inactive Object. Inactive Clients can be excluded from reporting in order to be more accurate.

Inactive Client report

Inactive Client report

Let’s see how to change the default number of days before an object will be set as inactive .

Continue reading