I wrote this PowerShell script last year when I wanted to automate the report of Active Directory user objects with Windows PowerShell. It was written with the intention of reporting the user objects within specific organizational units (OU) in two AD domains. Since there are multiple exported files during this process, I concatenated the separate files into one file by throwing them through the Import-CSV function. And finally, the merged file is emailed to the users who require viewing the file. You can create a new scheduled task in the OS to execute the script as often as you’d like.
I could not for the life of me find a single script, function or group policy setting that would auto create the Outlook 2007 and 2010 MAPI user profile for my internal users. Perhaps my scenario is different than most. My situation was a XenApp server which both external clients and internal employee’s connect to for published apps. I didn’t want to add a logon script to my internal user’s GPO because it would run on their local machines and inside of the ICA session, and I didn’t want to run a computer level script because it would run for […]
Be notified by email when an Active Directory user account is locked out, this powershell script will grab the most recent lockout event and send you an email notification. Requires a Windows 2008+ domain controller and an email system accepting a relay from the DC.
Can’t remember why I needed to, but if you need to get the SID of an Active Directory user account you can run either of these powershell scripts: $name = “username” (New-Object System.Security.Principal.NTAccount($name)).Translate([System.Security.Principal.SecurityIdentifier]).value or $objUser = New-Object System.Security.Principal.NTAccount(“fabrikam”, “kenmyer”) $strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier]) $strSID.Value