473,587 Members | 2,225 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Listing computers of a WinNT-Domain

Hi!
I'm using this code to list all computers of our WinNT-Domains:
import win32com.client
from pprint import pprint as p

domain='domainX '
auswahl='comput er'

def enumerate(domai n,auswahl):
adsi = win32com.client .Dispatch("ADsN ameSpaces")
nt = adsi.GetObject( "","WinNT:" )
result = nt.OpenDSObject ("WinNT://"+domain+"","", "",0)
result.Filter = [auswahl] # computer, user, group
domain = []
for machine in result:
domain.append(m achine.Name)
return domain
p(enumerate(dom ain,auswahl))

This works well with all domains except one domain. One of the domains
returns an emty list of computers, but it returns users an groups if I
set the filter accordingly; just the computers are missing (even if I
do not filter).
One week ago it was fully working... What can have happend? Any idea
anybody?

Regards
Dirk

PS: the computers are still existing in this domain.
Jul 18 '05 #1
2 4551
Hi !

Windows pb, not Python.

This domain :
- is with AD ?
- same protocol ?
- same rights ?
- connected like Administrator ?
- some services are disactived ?
- have you try with WMI ?
- have you try on the server primary server domain ?
- etc.
- etc.

Good courage...

@-salutations an *sorry for my bad english*
--
Michel Claveau
Jul 18 '05 #2
Hi Michael!

I have "domain-admin"-rights (I can see the computers in the
server-manager GUI).
This domain is exactly like the other domains, BUT it is much BIGGER
than the others.
As far as I found out meanwhile it seems as if my script is fully ok,
but because of the size of this domain, I don't get all elements. I
found out that my list of elements has exactly 4000 entries;
coincidence??? It looks like this object simply gets just the first
4000 elements.

Now I seem to have 2 possibilities:
1.: find out how to get the other elements on this way
or
2.: find another appropriate way to list all computer-accounts of this
domain.

At the moment I try to find some Microsoft-Tools which I can run from
commandline...

Dirk

"Michel Claveau/Hamster" <No********@No. Spam.mclaveau.N o.Spam.com> wrote in message news:<bo******* ***@news-reader3.wanadoo .fr>...
Hi !

Windows pb, not Python.

This domain :
- is with AD ?
- same protocol ?
- same rights ?
- connected like Administrator ?
- some services are disactived ?
- have you try with WMI ?
- have you try on the server primary server domain ?
- etc.
- etc.

Good courage...

@-salutations an *sorry for my bad english*

Jul 18 '05 #3

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

Similar topics

2
5790
by: t.schwenk | last post by:
hi ng! for our intranet i try to connect to the WinNT:// namespace from an asp (or from global.asa) to retrieve the usergroups which the current user is in (in order to regulate intranet-access). so i use: sUser = Request.ServerVariables("LOGON_USER") sUser = Right(sUser, Len(sUser) - InStr(sUser, "\"))
1
303
by: Moukarram Kabbash | last post by:
Hello everybody, how can I get the names of all neighbor computers in my local network ? Thanks in advance
10
1777
by: Raveen.B | last post by:
hi all, i have MSVC Project which was developed on Win 98 (quiet antique but true), now i move the development to Win NT. when i runt the application it fails with a message, "unable to create new document". what could be the causes of this error? but the same application if run in win 2k or XP is running fine. thanks Ravs
10
3661
by: ibic | last post by:
Just curious: is it possible to recursively list all the directorys/files inside a given directory using standard c i/o library routines only, which can be re-compiled and run on any os supportes c compiler? Or this is too os dependent, system-specific functions must be called? I think about this when i tried to do this under windows, i found...
1
1474
by: Jodi Wedll | last post by:
I am attempting to deploy my .Net Application from my WinXP development machine to production systems based upon WinNT and Win98. I believe that it is mostly working except for code relating to the error coding. I have error coding that warns the user of problems with the information supplied. I used "System.Windows.Forms.ErrorProvider"...
4
9741
by: Lucky | last post by:
hi there!!! very much newbie to socket progammin in .net. i've try the DNS class to get the ip addresses but it always returns 1 ip that of my pc though i got 50 PCs connected to the LAN. i tried everywhere so if anyone have code for getting all the ip addresses of the PCs. plz copy paste here so that i can try that out. Plz dont only give...
3
2695
by: Arpi Jakab | last post by:
I have a main project that depends on projects A and B. The main project's additional include directories list is: ...\ProjectA\Dist\Include ...\ProjectB\Dist\Include Each of the include directories contain a file named "cppfile1.h". In my main project I #include "cppfile1.h". I rely on the order of paths in additional include...
1
5681
by: Ivan | last post by:
Hi, I have moved an entire solution from .netframework 1.0 to 1.1; also I have migrated the solution to VS2003. After this I have added a new project (Web) to previous solution; I'm referencing a DLL from other project within the solution and including some user controls within my new project, but whenever I try to execute a new aspx I have...
1
5315
by: vhg119 | last post by:
Can someone please link me to some resource listing all the user attributes names? I'm writing some C# code using the System.DirectoryServices assembly. This particular function is suppose to search for a user by "displayName" and set the users phone numbers. I have an incomplete list of Properties: displayName, givenName, sAMAccountName......
62
4096
by: Juuso Hukkanen | last post by:
I am looking for a wish list of things which should be removed from the C (C99) - due to feature's bad security track record <OT>or Multithreading unsafety. I need this list for a project intending to build another (easiest & most powerful) programming language, which has a two page definition document stating: "... includes C programming...
0
7915
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...
0
8205
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
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...
0
6619
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...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
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...
0
3872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1185
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...

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.