Posts tagged Active Directory
Powershell to Get the count of user objects in Active Directory using LDAP Query
$Domain = ‘LDAP://DC=yourdomain;DC=com’
$Root = New-Object DirectoryServices.DirectoryEntry $Domain
$select = New-Object DirectoryServices.DirectorySearcher
$select.SearchRoot = $root
$adobj= $select.findall() |? {$_.properties.objectcategory -match “CN=Person”}
$adobj.count
For the $Domain variable change the “yourdomain” string to the name of your domain.
How to get Active Directory Users and Computers with Exchange Management Tools working in Windows 7
h3>1. Install the w7 AdminPak (RSAT)
Remote Server Administration Tools for Windows 7 Release Candidate (RC)
2.Install IIS and Remote Server Admin Tools (Active Directory Users and Computers)
Use the “Turn Windows features on or off” feature to add IIS Stuff and the RSAT Stuff
4. Copy some files to your windows system32 foolder.
I used the files from my XP installation with these bat files, you will have to get them yourself
(REMEMBER: you need to run the cmd promt as administrator, use the one in accessories, right click it)
Text file of files that need to be copied
Bat file to copy from old install (assuming D:\windows\system32)
If you dont have these files available, you might find them here
5. Register the files
(same deal with cmd promt as administrator)
eg:
regsvr32 /s adprop.dll
regsvr32 /s ws03res.dll
5. Vista ESM
Download from here
Run it to extract the MSI, then run the MSI from command prompt (with admin rights!) with the /q switch to get rid of the ‘not for vista’ error
eg: c:\users\you\downloads\esmvista\esmvista.msi /q
Wait at least 10 minutes while it does its thing.
It is is a silent install, you wont see anything, but I have had cases of it breaking because people started AD too soon.
6. Run Active Directory
Run Active Directory users and computers from your start menu.