User Maintenance Script with PowerShell

User Maintenance Script with PowerShell

Throughout my years as a sysadmin, I have needed to synchronize user information and HR data. In a previous job at a university, I developed a script to synchronize Oracle user information with AD data. I have written this script many times and believe that others may find it useful. While the university and OU names have been changed for privacy reasons, the underlying premise remains the same.

At the university, we had students whose status changed frequently throughout the day - they would enroll, drop classes, and so on. We needed to create, enable, or disable accounts and update majors. These changes were made in Oracle software and were not directly connected to AD. The Oracle administrators created a script that would export all the changes since the last run into a CSV file, which I would then use to make the necessary updates.

The next version of the script was supposed to query the database directly, eliminating the need for file swapping, but I left that job before it could be developed.

User Maintenance with PowerShell