Board index » Visual Studio » enumerate local computer profiles and delete
|
Fuel451
|
|
Fuel451
|
enumerate local computer profiles and delete
Visual Studio257
Is it possible to scan a range of machines and delete the profiles of userids that fit specific userid criteria? Thanks Carl - |
| Ray
Registered User |
Tue Jan 11 13:21:47 CST 2005
Re:enumerate local computer profiles and delete
I suggest you use delprof.exe for this.
www.microsoft.com/Resources/Documentation/windowsserv/2003/all/techref/en-us/delprof.asp">www.microsoft.com/Resources/Documentation/windowsserv/2003/all/techref/en-us/delprof.asp www.microsoft.com/Resources/Documentation/windowsserv/2003/all/techref/en-us/delprof_examples.asp">www.microsoft.com/Resources/Documentation/windowsserv/2003/all/techref/en-us/delprof_examples.asp http://www.microsoft.com/downloads/details.aspx?familyid" rel="nofollow" target="_blank">www.microsoft.com/downloads/details.aspx=901A9B95-6063-4462-8150-360394E98E1E -- Ray at work Microsoft ASP/ASP.NET MVP "Carl Hilton" <someone@microsoft.com>wrote in message QuoteIs it possible to scan a range of machines and delete the profiles of - |
| mdiddy
Registered User |
Tue Jan 11 13:35:05 CST 2005
Re:enumerate local computer profiles and delete
I will assume there is a share c$ on the remote computer and that you have
access to it. I'll also assume the profiles are stored in the "documents and settings" folder on the c drive. You could do something like this: set objfso = createobject("scripting.filesystemobject") computername = inputbox("what computer do you want to delete the profiles on?") if (insert code here to match what criteria you want to match) objfso.deletefile("\\" & computername & "\c$\documents and settings\profiles\xxxxxx") wscript.echo "done" end if replace xxxxx with the particular profile you are wanting to delete and create your code for the matching criteria and you'd be good to go. If you give more specifics regarding what criteria you're wanting to match and what profiles you want deleted, we could probably be more specific. "Carl Hilton" wrote: QuoteIs it possible to scan a range of machines and delete the profiles of |
| Khaled
Registered User |
Tue Jan 11 15:59:05 CST 2005
Re:enumerate local computer profiles and delete
how to make this process generic ... for example, the idea is to either
delete previously created user local profiles on logon or to delete the current user local profile on logoff. BTW, that script was very helpfull. Khaled "mdiddy" wrote: QuoteI will assume there is a share c$ on the remote computer and that you have |
| Al
Registered User |
Tue Jan 11 22:17:36 CST 2005
Re:enumerate local computer profiles and delete"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial>wrote in message news:uzYcNLB%23EHA.2552@TK2MSFTNGP09.phx.gbl... QuoteI suggest you use delprof.exe for this. Delprof is a useful tool, however it is quite limited. You can only specify to delete all profiles older than a certain age, and/or be prompted for each one to delete. Too bad there is no option to specify either a specific name or a wildcard. /Al Quote-- - |
| Al
Registered User |
Tue Jan 11 22:19:44 CST 2005
Re:enumerate local computer profiles and delete"Khaled Jaber" <Khaled Jaber@discussions.microsoft.com>wrote in message Quotehow to make this process generic ... for example, the idea is to either profiles exist in the registry. I would be concerned that, over time, deleting only the file folder part might leave references in the registry that could cause problems later on. /Al QuoteKhaled - |
| Carl
Registered User |
Wed Jan 12 05:37:28 CST 2005
Re:enumerate local computer profiles and delete
Now, this script does NOT delete the HKU entries for the user... does
DELPROF? Carl "Khaled Jaber" <Khaled Jaber@discussions.microsoft.com>wrote in message Quotehow to make this process generic ... for example, the idea is to either - |
| Ray
Registered User |
Wed Jan 12 08:27:05 CST 2005
Re:enumerate local computer profiles and delete
"Al Dunbar [MS-MVP]" <alan-no-drub-spam@hotmail.com>wrote in message
QuoteDelprof is a useful tool, however it is quite limited. You can only just deleting than handling that side of things. The criteria that people use could vary greatly, so I think it's fine to have to handle selecting which profiles to delete in other ways, i.e. with some vbs code. Ray at work - |
| Al
Registered User |
Wed Jan 12 18:26:52 CST 2005
Re:enumerate local computer profiles and delete"Carl Hilton" <someone@microsoft.com>wrote in message QuoteNow, this script does NOT delete the HKU entries for the user... does /Al QuoteCarl - |
