开发者

Confusion as to what this is exactly returning (WinNT in VB.net)

开发者 https://www.devze.com 2023-03-06 17:24 出处:网络
\'get list of all users on domain Dim de As New DirectoryEntry() de.Path = \"WinNT://Domain.mydomain/JohnDoe2-1\"
'get list of all users on domain

     Dim de As New DirectoryEntry()
     de.Path = "WinNT://Domain.mydomain/JohnDoe2-1"
     For Each d As DirectoryEntry In de.Children()
        Console.WriteLine(d.Name)
        Console.ReadLine()
    Next

When I run WintNT://Domain.mydomain it lists the users on the domain. When I run it with /JOhnDoe2-1 I get a list of something. Are these files and is there a way to expand to search wit开发者_开发知识库hin them?

Any hints toward searching domain users for a specific file would be helpful. Thanks folks


What that returns depends on what JohnDoe2-1 is... is it a user? a computer name? something else? We don't know...

For hints on solving your problem, look at http://msdn.microsoft.com/en-us/library/aa772211(v=VS.85).aspx and http://msdn.microsoft.com/en-us/library/aa746534(v=vs.85).aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消