473,698 Members | 2,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Enumerate Domain

How do I enumerate the machines domain, then enumerate the
shares of a machine?
Jul 21 '05 #1
5 2042
I"m not sure about the shares, but you can use DirectoryServic es. Here's an
article I posted a while back that will get you all of the resources in AD:

http://www.knowdotnet.com/articles/d...yservices.html
"Jeff Grundy" <je********@nos pam.com> wrote in message
news:09******** *************** *****@phx.gbl.. .
How do I enumerate the machines domain, then enumerate the
shares of a machine?

Jul 21 '05 #2
I am trapped in an NT 4.0 domain...no active directory.

-----Original Message-----
I"m not sure about the shares, but you can use DirectoryServic es. Here's anarticle I posted a while back that will get you all of the resources in AD:
http://www.knowdotnet.com/articles/d...yservices.html
"Jeff Grundy" <je********@nos pam.com> wrote in message
news:09******* *************** ******@phx.gbl. ..
How do I enumerate the machines domain, then enumerate the shares of a machine?

.

Jul 21 '05 #3
Sorry Jeff, not sure about NT4
"jeff grundy" <je********@nos pam.com> wrote in message
news:04******** *************** *****@phx.gbl.. .
I am trapped in an NT 4.0 domain...no active directory.

-----Original Message-----
I"m not sure about the shares, but you can use

DirectoryServic es. Here's an
article I posted a while back that will get you all of

the resources in AD:

http://www.knowdotnet.com/articles/d...yservices.html
"Jeff Grundy" <je********@nos pam.com> wrote in message
news:09******* *************** ******@phx.gbl. ..
How do I enumerate the machines domain, then enumerate the shares of a machine?

.

Jul 21 '05 #4
Hello Jeff,

Thanks for your post. You can take a look at Network Management Functions.
For example, calling NetGetJoinInfor mation to get a computer's domain name,
and NetShareEnum() to enumerate the shares of a machine.

Network Management Functions
http://msdn.microsoft.com/library/de...us/netmgmt/net
mgmt/network_managem ent_functions.a sp

Since they are unmanaged APIs, you may use P/Invoke to call them from
within your .NET managed application:
Consuming Unmanaged DLL Functions
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconconsumingu nmanageddllfunc tions.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #5
That is what I was looking for, thanks.
-----Original Message-----
Hello Jeff,

Thanks for your post. You can take a look at Network Management Functions.For example, calling NetGetJoinInfor mation to get a computer's domain name,and NetShareEnum() to enumerate the shares of a machine.

Network Management Functions
http://msdn.microsoft.com/library/default.asp? url=/library/en-us/netmgmt/netmgmt/network_managem ent_functions.a sp

Since they are unmanaged APIs, you may use P/Invoke to call them fromwithin your .NET managed application:
Consuming Unmanaged DLL Functions
http://msdn.microsoft.com/library/default.asp? url=/library/en-us/cpguide/html/cpconconsumingu nmanageddllfunc tions.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
.

Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3609
by: Mad Scientist Jr | last post by:
I would like to write a vb.asp.net function Private Function fn_sGetRoles(byval sDelimiter as string) As String that simply returns a delimited list of all the roles a user belongs to. I did some research, and found a number of solutions, that all seem to use a WindowsIdentity type object. However, when I try to convert
2
1300
by: Mat | last post by:
How to enumerate windows domains in LAN. How to do it?
5
320
by: Jeff Grundy | last post by:
How do I enumerate the machines domain, then enumerate the shares of a machine?
0
852
by: Ben | last post by:
Hello, I would like to enumerate trusts relationship in one domain and I'm using VB.net. Does anybody know how can I do ? I have thought to use a shell command like "nltest /DOMAIN_TRUSTS" but I 'm not a developper and I don't know how can I do ? Any idea, help ?
0
899
by: Ben | last post by:
Hello, I would like to enumerate all the trust relationship for one domain, in vb.net. Does anybody kno how I can do ? Thanks. Benoit
23
12364
by: BH Jodo Kast | last post by:
Hi, I found this handy script and I'm trying to convert it to VB.NET. It pops up a list of members in the Administrators/Builtin group. Can't seem to get DirectorySearcher or DirectoryEntry working similar to this. Run this as a VBS script to see: Option Explicit Dim strUser, strMember, strDNSDomain, strContainer Dim objGroup, objUser, objRootDSE
0
1064
by: Morten Fagermoen | last post by:
Hi! I have a function that returns a System.Collections.Generic.List(Of String) of the users in a specified group. It seems to work fine with an exception of the Domain Users group. When I query Domain Users I only get a few users back even if it is several thousand members in this group. The code I use is: Sub GetGroupMembers(ByVal ggmGroup As String, ByRef ggmMembers As System.Collections.Generic.List(Of String))
0
2503
by: bcanter | last post by:
I found a file on the web that will allow you to enumerate groups but it was an .hta and the top level admins won't allow this. I need to give managers access to the groups so that when a new user is created they can tell me who they want their account to be modeled after. The html app works great as a .hta file but when it is saved as a web page it won't list the members of any groups. I get an error on line 182: "ActiveX component can't create...
0
8706
by: PRR | last post by:
Here is a code i found on "how to enumerate appdomains in a current process". The original code was posted by Thomas Scheidegger Add the following as a COM reference - ~\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscoree.tlb using mscoree; using System.Runtime.InteropServices;
0
8683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7740
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4623
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.