ATTN: W2K Server wizards!

RedRooster

Diamond Member
Sep 14, 2000
6,596
0
76
I could use a little help here, wondering if anyone can help.
Is there anyway to output the localgroups(net localgroup) and the users of each group(net localgroup groupname) to a nice simple textfile? I'm trying to work with taking the results of net localgroup from the command line and then split on the * in perl, and it's a great pain in the butt. :)

What I'm trying to accomplish is move all localgroups and users to a linux machine and re-create them all on the linux machine.

Anyone have any ideas?
 

DaveJ

Platinum Member
Oct 9, 1999
2,337
1
81
Just use a redirect...

net localgroup > c:\localgroup.txt
net localgroup mygroup > c:\mygroup.txt

:)

Dave
 

RedRooster

Diamond Member
Sep 14, 2000
6,596
0
76
Hehe, I'm doing that right now, but parsing through the mess once it's in there is the hard part. :)
I wish the was an export or dump command which would output the localgroups and users to a text file in a different format.
As it is now, it comes out as:

LocalGroup:
-------------------------------------------------
*Admins *DNS Admins *Guests
*DHCP Users *Students *Other


And getting through that file by splitting on * and making the appropriate syscalls to get it to come out as "net localgroup Admins" as an example, is just tough. :)