Home All Groups Group Topic Archive Search About

Need script to delete list of AD accounts



Author
4 Oct 2007 10:23 PM
D.P. Roberts
I have a text file of several hundred usernames that need to be deleted from
Active Directory. These users are scattered among several OUs, but they are
all located in the same domain. Is there a way in vbs I can delete these
accounts? If not, are there any 3rd party applications that can do this?

Thanks!

Author
5 Oct 2007 8:09 AM
Pegasus (MVP)
"D.P. Roberts" <DProbe***@pbride.com> wrote in message
news:e49Y1UtBIHA.2004@TK2MSFTNGP06.phx.gbl...
>I have a text file of several hundred usernames that need to be deleted
>from Active Directory. These users are scattered among several OUs, but
>they are all located in the same domain. Is there a way in vbs I can delete
>these accounts? If not, are there any 3rd party applications that can do
>this?
>
> Thanks!
>

Would the command

net user DRoberts /domain /delete

do it for you?
Author
5 Oct 2007 3:21 PM
D.P. Roberts
That is exactly what I was looking for - thanks!

Show quote
"Pegasus (MVP)" <I.***@fly.com> wrote in message
news:eY8wEcyBIHA.4880@TK2MSFTNGP03.phx.gbl...
>
> "D.P. Roberts" <DProbe***@pbride.com> wrote in message
> news:e49Y1UtBIHA.2004@TK2MSFTNGP06.phx.gbl...
>>I have a text file of several hundred usernames that need to be deleted
>>from Active Directory. These users are scattered among several OUs, but
>>they are all located in the same domain. Is there a way in vbs I can
>>delete these accounts? If not, are there any 3rd party applications that
>>can do this?
>>
>> Thanks!
>>
>
> Would the command
>
> net user DRoberts /domain /delete
>
> do it for you?
>
Author
6 Oct 2007 6:37 PM
Al Dunbar
Would you be at all concerned about any home folders that these accounts
might have had, like, should they be deleted as well?

/Al

Show quote
"D.P. Roberts" <DProbe***@pbride.com> wrote in message
news:ua9XoN2BIHA.4176@TK2MSFTNGP06.phx.gbl...
> That is exactly what I was looking for - thanks!
>
> "Pegasus (MVP)" <I.***@fly.com> wrote in message
> news:eY8wEcyBIHA.4880@TK2MSFTNGP03.phx.gbl...
>>
>> "D.P. Roberts" <DProbe***@pbride.com> wrote in message
>> news:e49Y1UtBIHA.2004@TK2MSFTNGP06.phx.gbl...
>>>I have a text file of several hundred usernames that need to be deleted
>>>from Active Directory. These users are scattered among several OUs, but
>>>they are all located in the same domain. Is there a way in vbs I can
>>>delete these accounts? If not, are there any 3rd party applications that
>>>can do this?
>>>
>>> Thanks!
>>>
>>
>> Would the command
>>
>> net user DRoberts /domain /delete
>>
>> do it for you?
>>
>
>
Author
8 Oct 2007 6:34 PM
D.P. Roberts
Yes. I have a separate script to delete home directories but if you know of
a solution that does both I'm all ears.

Thanks.

Show quote
"Al Dunbar" <AlanD***@hotmail.com.nospaam> wrote in message
news:%23Ia3%23fECIHA.4836@TK2MSFTNGP06.phx.gbl...
> Would you be at all concerned about any home folders that these accounts
> might have had, like, should they be deleted as well?
>
> /Al
>
> "D.P. Roberts" <DProbe***@pbride.com> wrote in message
> news:ua9XoN2BIHA.4176@TK2MSFTNGP06.phx.gbl...
>> That is exactly what I was looking for - thanks!
>>
>> "Pegasus (MVP)" <I.***@fly.com> wrote in message
>> news:eY8wEcyBIHA.4880@TK2MSFTNGP03.phx.gbl...
>>>
>>> "D.P. Roberts" <DProbe***@pbride.com> wrote in message
>>> news:e49Y1UtBIHA.2004@TK2MSFTNGP06.phx.gbl...
>>>>I have a text file of several hundred usernames that need to be deleted
>>>>from Active Directory. These users are scattered among several OUs, but
>>>>they are all located in the same domain. Is there a way in vbs I can
>>>>delete these accounts? If not, are there any 3rd party applications that
>>>>can do this?
>>>>
>>>> Thanks!
>>>>
>>>
>>> Would the command
>>>
>>> net user DRoberts /domain /delete
>>>
>>> do it for you?
>>>
>>
>>
>
>
Author
8 Oct 2007 8:16 PM
Al Dunbar
If the separate script works to your satisfaction, I'd say leave well enough
alone. If you wanted to do it from the account deletion script, you would
need to be using an account that had sufficient rights on all servers where
home folders might be located to un-share them (if shared) and then delete.
Sorry, but I don't have the code, and no need for a bulk delete script
anyway.

/Al

Show quote
"D.P. Roberts" <DProbe***@pbride.com> wrote in message
news:eIgMcndCIHA.1208@TK2MSFTNGP05.phx.gbl...
> Yes. I have a separate script to delete home directories but if you know
> of a solution that does both I'm all ears.
>
> Thanks.
>
> "Al Dunbar" <AlanD***@hotmail.com.nospaam> wrote in message
> news:%23Ia3%23fECIHA.4836@TK2MSFTNGP06.phx.gbl...
>> Would you be at all concerned about any home folders that these accounts
>> might have had, like, should they be deleted as well?
>>
>> /Al
>>
>> "D.P. Roberts" <DProbe***@pbride.com> wrote in message
>> news:ua9XoN2BIHA.4176@TK2MSFTNGP06.phx.gbl...
>>> That is exactly what I was looking for - thanks!
>>>
>>> "Pegasus (MVP)" <I.***@fly.com> wrote in message
>>> news:eY8wEcyBIHA.4880@TK2MSFTNGP03.phx.gbl...
>>>>
>>>> "D.P. Roberts" <DProbe***@pbride.com> wrote in message
>>>> news:e49Y1UtBIHA.2004@TK2MSFTNGP06.phx.gbl...
>>>>>I have a text file of several hundred usernames that need to be deleted
>>>>>from Active Directory. These users are scattered among several OUs, but
>>>>>they are all located in the same domain. Is there a way in vbs I can
>>>>>delete these accounts? If not, are there any 3rd party applications
>>>>>that can do this?
>>>>>
>>>>> Thanks!
>>>>>
>>>>
>>>> Would the command
>>>>
>>>> net user DRoberts /domain /delete
>>>>
>>>> do it for you?
>>>>
>>>
>>>
>>
>>
>
>

AddThis Social Bookmark Button