Showing results for 
Show  only  | Search instead for 
Did you mean: 
Champion Sweeper III

This action can be used to delete old user profiles from a remote computer.

This example deletes all user profiles not used in the last 180 days.

The tool can be downloaded from the Microsoft website:

Copy "delprof.exe" to your action folder.

{actionpath}delprof.exe /q /i /c:\\{smartname} /d:180
Engaged Sweeper II
I like this Action, but anyone have any thoughts on how to use AD to delete the Disabled user profiles, rather than by age?

Trying to figure that out myself or a better way in lansweeper @DaveDischord 

Lansweeper Employee
Lansweeper Employee
You can create new actions in configuration\Asset Pages.

Do be aware that this is a quite old topic, so I can't guarantee that the original post still works.
Engaged Sweeper

I also need some help installing this action and applying it to a number of computers on our network.

Engaged Sweeper
Can someone tell me exactly how you get these to work? Sorry for the stupid question but I am fairly new to this aspect of LS. I jest need to know what to save the file as and where I put it to get it to work. Even if there are instructions somewhere I can be pointed to.

Engaged Sweeper
What happens to the local Admin account when these scripts are run? We have a local admin account that only IT has the password to perform various administrative functions.
Engaged Sweeper
I ran into a similar issues launching the script. Ultimately, I used @BulmersheTech 's script with a couple tweaks. I had to share the default actions folder with my domain admin service account and enable remote registry access via GPO.

I migrated my Lansweeper server from a lab environment to production, so I also had to change the default action path in Lansweeper configuration page.

Here's my cmd file:

@echo off
set PSPATH=\\<network path to action folder>
set PC=%1
%PSPATH%\delprof2.exe /c:\\%PC% /d:90 /ntuserini /ed:admin* /i
timeout 20

Increasing the timeout helped troubleshoot the remote registry access error.
Engaged Sweeper
Trying to use delprof2 as an action in the new Lansweeper and am running across an Access Denied that I never used to get in the old Lansweeper. I click on the action and the Helge Klein window pops up, I say Ok and get the command prompt with the request to delete inactive profiles and type "Y" and really quick before the CMD disappears, I see an Access is Denied message.

Have tried as Built-in user, target workstation Administrator and server Administrator.

action I'm using is: {actionpath}\delprof2.exe /p /c:\\{smartname}

Also tried making delprof2 a deployment option as we have a group of PCs that regularly get bogged down with roaming profiles and being able to clean those as a deployment option would be awesome but so far no luck with that script - just doing a simple one-step CMD script below

{actionpath}delprof2.exe /c:\\{smartname} /r

(have tried it without {actionpath} as well as without the "/c:\\..." trigger and get an "Incorrect function" each time.)

Would appreciate any help with either of these if possible!
Engaged Sweeper II
Also using delprof2. Just tweaked a little to give a timeout on the command window.

Create a delprof2.cmd file in the Actions folder

@echo off

set PSPATH=\\path-to-your-actions-folder
set PC=%1

%PSPATH%\delprof2.exe /u /i /c:\\%PC% /d:90

timeout 10

The Action then becomes:-

{actionpath}\delprof2.cmd {smartname}

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now