search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Getting LDAP paths of Active Directory Computers with Powershell
Posted in Windows Powershell, Windows Server | 1 Comment | 5,604 views | 09/10/2009 12:59

Do you need to see LDAP paths of your all computers in Active Directory?

1
2
3
4
5
6
7
8
$Searcher = New-Object DirectoryServices.DirectorySearcher([ADSI]"")
$Searcher.Filter = "(objectClass=computer)"
$Computers = ($Searcher.Findall()) 
Foreach ($Computer in $Computers)
{
$Path=$Computer.Path
write-host $Path
}

LDAP names can save your life :) You can use LDAP names in your Powershell scripts to manage your computers.


Comments (1)

OldCmp Active Directory Reporting Tool

December 15th, 2009
02:44:28

[…] Yusuf Ozturk » Getting LDAP paths of Active Directory Computers … […]



Leave a Reply