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 […]
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