[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

delete profiles on remote computers

Posted on 2008-02-12
5
Medium Priority
?
927 Views
Last Modified: 2008-06-08
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.
0
Comment
Question by:dbrs_helpdesk
3 Comments
 

Author Comment

by:dbrs_helpdesk
ID: 20878544
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
 
LVL 12

Accepted Solution

by:
zoofan earned 500 total points
ID: 20898622
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
 

Expert Comment

by:gladmins
ID: 21092820
Can you use it in a batch file to run on about 350 pcs?
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
Resolve DNS query failed errors for Exchange
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Get the source code for a fully functional Access application shell with several popular security features that Access VBA application developers desire, but find difficult or impossible to figure out how to code. You get the source code for managi…

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question