Page 1 of 1 1
Topic Options
#109340 - 2003-12-01 05:14 PM Bulk modification of NT User Accounts
Mfarah Offline
Fresh Scripter

Registered: 2003-09-24
Posts: 27
Loc: London
Hi guys

I am looking for a scrit that would allow me to make bulk changes to user accounts in an NT Domain. For example I would like a script that allows me to change the login script for users.

I am unsure as to whether this is possible with Kix. I have tried searching the forums but cannot find any matches.

Thanks
Michael

Top
#109341 - 2003-12-01 05:20 PM Re: Bulk modification of NT User Accounts
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I found this post: http://www.kixtart.org/ubbthreads/showthreaded.php?Cat=&Number=45138&page=&view=&sb=5&o=&vc=1
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#109342 - 2003-12-01 05:44 PM Re: Bulk modification of NT User Accounts
Mfarah Offline
Fresh Scripter

Registered: 2003-09-24
Posts: 27
Loc: London
Thanks for that Howard
Top
#109343 - 2003-12-02 01:38 AM Re: Bulk modification of NT User Accounts
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Hmmm.. I wrote that one a while back, but Chris S. showed an even faster method. The way I do the filtering there is not optimal. Not sure where the updated script ideas by Chris are. Maybe if he sees this post he can provide the link or provide an even better code sample.
Top
#109344 - 2003-12-02 02:14 AM Re: Bulk modification of NT User Accounts
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
HEHEE...
I ripped that shamelessly from DOC.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#109345 - 2003-12-02 03:05 AM Re: Bulk modification of NT User Accounts
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
No problem... I ripped it from Bryce a long time ago.

Remember the wedgee... post?

http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Board=UBB2&Number=61467

Top
#109346 - 2003-12-02 03:10 AM Re: Bulk modification of NT User Accounts
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Further searching shows it may have started with Howard in this post.

http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Board=UBB13&Number=84571

Top
#109347 - 2003-12-02 03:17 AM Re: Bulk modification of NT User Accounts
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
LOL
Nice walk down memory lane. Come to think of it, you came up with the LDAP version for me.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#109348 - 2003-12-02 02:28 PM Re: Bulk modification of NT User Accounts
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Here's what Doc was talking about. When filtering an LDAP object one has to use this method to get the filter to work properly. For large AD domains, like Doc's, it is faster than testing the .Class property...

Code:

Break On

$ticks = @ticks
Dim $sFilter[0] $sFilter[0]="User"
$Objects = GetObject('LDAP://CN=users,DC=company,DC=com')
$Objects.Filter = $sFilter
For Each $Object in $Objects
;If $Object.Class = "User"
$i = $i + 1
;EndIf
Next

$i " objects enum'd in "@ticks-$ticks" ticks." ?


Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 840 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.058 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org