W2K - AD related question....
Author
Discussion

Podie

Original Poster:

46,649 posts

299 months

Friday 23rd July 2004
quotequote all
Access to directories on a W2K server are controlled by AD… now if I want to find out who has access to that directory, I would use the following at a comman prompt…

Net localgroup [AD group name] /domain

… question is, is there a way I can run a report of EVER group on the server to show who has access…?

Podie

Original Poster:

46,649 posts

299 months

Friday 23rd July 2004
quotequote all
dammit where are the IT :geek: when you need them…!?!

plotloss

67,280 posts

294 months

Friday 23rd July 2004
quotequote all
If you can get a list of groups and domains surely you could iterate round them and issue this command at each record?

Surely theres a product out there that does this, surely?

Podie

Original Poster:

46,649 posts

299 months

Friday 23rd July 2004
quotequote all
plotloss said:
Surely theres a product out there that does this, surely?



You'd think so... wouldn't you?

Better get scrpiting..

>> Edited by Podie on Friday 23 July 09:01

anonymous-user

78 months

Friday 23rd July 2004
quotequote all
If you want to script something in VBScript or similar, use the ADSI COM objects.

If you want to use .Net, then the System.Directory namespace has all you need.

If you can get away with it, AD can be interogated with any LDAP browser of which there are plenty about.

Podie

Original Poster:

46,649 posts

299 months

Friday 23rd July 2004
quotequote all
Right, sussed it...

At the command prompt;

net localgroup /domain |find /i "[GROUPIDENTIFYER]" >group.txt

Then you end up with a text file of all the groups that start with "abc" or whatever the identifyer happens to be.

Next I created a *.cmd file with the following…..


@echo off
cls
for /f "tokens=*" %%i in (y:stuffgroup.txt) do (
net localgroup %%i /domain >>y:polandallgrpinfo.txt
)


… and ta da…! Happy Pod.