Category Archives: Active Directory

(re)Setting rights on user home folders [batch script]

After some troubles with copied user home folders during a migration, the rights were set incorrectly. As this was about more than just a handful of users, re-setting the rights manually wasn’t a good idea. After digging around on the … Continue reading

Posted in .bat, Active Directory, batch, command line, File sharing | Comments Off on (re)Setting rights on user home folders [batch script]

Get a list of all computers in Active Directory with date lastlogon and OS

I needed to list all computers in use at customers, with os, and for the less diligently maintained AD’s also if they were still in use. You can obtain this by reading the value of lastlogondate of a machine account. … Continue reading

Posted in Active Directory, powershell | Comments Off on Get a list of all computers in Active Directory with date lastlogon and OS

Active Directory Powershell get [the count of] all enabled users in a certain OU [but not in sub OU’s]

For our internal use, I devised a powershell command that lists all enabled users in a certain OU, but filtering out those in sub OU’s. Unfortunately this is not a dynamic process, since it is based on the current implementation of OU’s, … Continue reading

Posted in Active Directory, powershell | Comments Off on Active Directory Powershell get [the count of] all enabled users in a certain OU [but not in sub OU’s]

Powershell, get full names of a group of users in AD and export to text file.

Just a quick blurb that I encountered this morning. In powershell, to get a list of the full names of users and export them to a text file: Get-ADGroupMember -identity GROUP -Recursive | Get-ADUser -Property DisplayName | Select Name > c:\temp\fullnamesofgroup.txt … Continue reading

Posted in Active Directory, powershell | Comments Off on Powershell, get full names of a group of users in AD and export to text file.

Windows Server 2008 r2 Domain Controller boots into Active Directory Repair

Problem! My Windows 2008 R2 DC (the only one) boots into Active Directory Repair mode. Now I can’t log in, because the Active Directory services aren’t started. I can’t even restart the system correctly, running as a VMware virtual machine, … Continue reading

Posted in Active Directory, Windows, Windows Server | Comments Off on Windows Server 2008 r2 Domain Controller boots into Active Directory Repair