Need assistance badly!
I need your help. I'm not a scripter, I just edit existing scripts to
make them work for my environment. I've been tasked with making a
script that will run weekly to search Active Directory for users with
special prefixes (we have 4 of these groups) on their SAM Account
Names;
1) am.SAMAccountName
2) re.SAMAccountName
3) es.SAMAccountName
4) ic.SAMAccountName.
Once I have these results, they want them automatically emailed with a
format that shows the SAM Account Name and User Name, and last logon
time.
I have tried cobbling together a script that does this, but have not
gotten it correct to just show me both names at once, let alone
writing the output to a file and emailing it as the body of a
message.
Any help on this would be greatly appreciated!
.
Relevant Pages
- Re: Mass Username Change-How do I do it?
... What I am looking to change is the users login name (SAM account name) Will the script you provided do that? ... Assuming you are changing the NT Names and that the first name and last name fields are filled in, a VBScript program to modify all users in AD could use ADO to retrieve the values for all users, then bind to each user object and modify. ... ' Move to the next record in the recordset. ... (microsoft.public.windows.server.general) - Re: dsmod or script for renaming AD users
... Joe Richards Microsoft MVP Windows Server Directory Services ... Thank you for your quick answer, I think the approch with the vbs script should work. ... Altought I never thought that Windows Server 2003 SP1 requires the use of three different command line tools for such a simple task like renaming a user account. ... Any ideas how to change the SAM account name of the renamed users by command or script? ... (microsoft.public.windows.server.active_directory) - Re: dsmod or script for renaming AD users
... Thank you for your quick answer, I think the approch with the vbs script ... custom vb script) for such a simple task like renaming a user account. ... What doesn't work is the change for the SAM account name. ... command or script? ... (microsoft.public.windows.server.active_directory) - Adding users: BULK Import-csv AND PowerShell
... The script generates the required 200 users list. ... problem with my SamAccountName. ... generates a SAM Account Name. ... I can rename this SamAccountName after the ... (microsoft.public.exchange.admin) - Re: rsync and cron
... the reason is differences of environment. ... you might wish to edit your script ... (comp.unix.bsd.freebsd.misc) |
|