Getting LDAP paths of Active Directory Computers with Powershell
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.
Tags: get ldap paths powershell, powershell active directory ldap, powershell get all computers, powershell ldap names, powershell ldap paths
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
December 15th, 2009 at 2:44 am
[...] Yusuf Ozturk » Getting LDAP paths of Active Directory Computers … [...]