Friday

active directory - get computer lists



public void AD_ComputerList()
{
DirectoryEntry entry = new DirectoryEntry("LDAP://my-dom");
DirectorySearcher mySearcher = new DirectorySearcher(entry);
mySearcher.Filter = ("(objectClass=computer)");
Console.WriteLine("Listing of computers in the Active Directory");
Console.WriteLine("============================================");
foreach(SearchResult resEnt in mySearcher.FindAll())
{
Console.WriteLine("Name: {0}", resEnt.GetDirectoryEntry().Name.ToString());
}
Console.WriteLine("=========== End of Listing =============");

}

No comments:

here is powershell script on how to get list of files from changesets associated with one tfs task

$dllPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\...