Powershell – Update Computer Description on Logon

This script updates the Computer’s AD object description when a user logs into it. YOu would run this as a logon task via a Group Policy

We currently use a VBS script to update a computers description in AD to indicate Make/Model serial number and last user logged in

Well that is all greek to me an I understand powershell a bit so this is what I came up with.
Now I am a lazy guy and doing WMI queries does my head in. Luckly the guys at GoverLan have this free tool that allows you to browse the WMI tree and generate Powershell code to query it. So the bit below is a mashup of their code and mine

 

 

Leave a comment

Your email address will not be published. Required fields are marked *