delete profiles on remote computers

Hello,

I need a VB script that will delete profiles on 10 remote computeres within our network.  The only profile that needs to stay is the administrator profile.  These computers are in our training room.  I need to run this script from any PC that will interact with the remote PC's.
dbrs_helpdeskAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dbrs_helpdeskAuthor Commented:
I found this script but it does not work

@echo off
for /f "tokens=*" %%a in ('dir c:\docume~1 /b /ad') do call :process "%%a"
goto :eof
 
:process
if [%1]==["Administrator"] goto :eof
if [%1]==["All Users"] goto :eof
if [%1]==["Default User"] goto :eof
if [%1]==["LocalService"] goto :eof
if [%1]==["NetworkService"] goto :eof
cd\docume~1
echo. About to remove profile %1
pause
rmdir %1 /s /q

Open in new window

0
zoofanCommented:
One way I found to do this was using the RK tool delprof.exe and scripting it.

Can be found here.
http://www.microsoft.com/downloads/details.aspx?familyid=901a9b95-6063-4462-8150-360394e98e1e&displaylang=en


zf
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gladminsCommented:
Can you use it in a batch file to run on about 350 pcs?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.