Jump to content

Windows 10 logon multiple profile folders with 000.001, etc (hard file path limit?)


Recommended Posts

Posted

Hello all

 

First post here and it’s a doozy.

 

Mid-sized secondary school just rolling out Windows 10 LTSC with staff & pupils using mandatory profiles. Usual kerfuffle with printers vanishing and now, as I trial OneDrive as a replacement for the horrible OneDrive mapper script, (since MS finally released the ‘per machine’ version), I’ve hit a new problem.

 

C:\users folder filling up with multiple copies of the same user profiles;

 

Staff-username

Staff-username.DOMAIN

Staff-username.DOMAIN.000

Staff-username.DOMAIN.000.001

Staff-username.DOMAIN.000.001.002

 

Etc, etc.

 

When it gets to about 20 + failed relogs;

 

Staff-username.DOMAIN.000.001.002.003.004.005.006.007.008.009.010.011.012.013.014.015.016.017.018.019.020.021.022.023…. things start to break.

 

GPO errors, desktop shortcuts, printers, etc.

 

All that’s in those folders is the users OneDrive folder. And in there, files, some of which are, (and especially when we get to the latter stages), longer than 256 characters in length.

 

Windows 7 did this;

 

Staff-username

Staff-username1

Staff-username2

 

So whilst it would cause the same issue eventually , it would take about 10 thousand billion failed logons to start killing GPO’s whereas Windows 10 falls over in about 10.

 

Seems like Windows can’t relog to existing user folder as it can’t read some files as they are over the limit so it creates a new one and appends .001, 001.002, etc to the end making things worse next logon.

 

My brute force PowerShell reboot clear-out script fails too because of the same issue. I’m having to manually delete some and PowerShell others. Previous manager used delprof but i found that flaky.

 

Even with OneDrive set via GPO to “Use OneDrive files-on-demand”, it still downloads opened files, and if god forbid, one puts the absolute path over 256 characters……you are doomed when users relog.

 

Not nice, but you cant make OneDrive online only.

 

I’ve brought in Microsoft with a £400 phone call but I reckon the only answer to this is for users to shorten their file paths, (or i so it for them with powershell), or I bring back the O: with OneDrive mapper ☹

 

Sigh. Any ides?

Posted

if i had to guess id bet onedrive and mandatory profiles arnt compatible as even if you use the all user version the default sync location is still c:\users\name\onedrive iirc (its definitely in c: users\name)

 

i dont think mandatory profiles are even supported any more are they?

 

as for just deleting old profiles have a look at delprof but it might be worth running it at startup rather than shutdown (or both) as if files are still open it cant close them and id imagine with onedrive it might even sync if a user has logged out

Posted
Don't think Microsoft bother to test anything with Mandatory or Roaming profiles any more, just have to give up on them, lots of other ways to do the same thing anyway.
Posted (edited)

In a school? How? i must admit that before working here, i'd never touched a mandatory profile and never used a roaming one for years. Theyre a right kerfuffle, but with 1200 kids and 60 gb HDDS on classroom PC's..... my options are llimited.

 

UE-V perhaps? I've not looked into that.

Edited by CCoulter
Posted (edited)

Mandatory and Roaming profiles are no longer supported in Windows 10. The only support either local profiles or UEV (User Experience Virtualisation).

 

https://docs.microsoft.com/en-us/windows/configuration/ue-v/uev-for-windows

 

UEV stores user settings in there folder redirection location (or home drive). We have also setup Delprof2 to run as a scheduled task to delete cached profiles when a users hasn't logged in after 7 days.

Edited by aleach2
Posted
Mandatory and Roaming profiles are no longer supported in Windows 10

 

Is that definitely true? Do Microsoft really no longer support mandatory and/or roaming profiles in all Win10 versions/releases?

 

Thanks.

Posted
Is that definitely true? Do Microsoft really no longer support mandatory and/or roaming profiles in all Win10 versions/releases?

 

Thanks.

 

That is what I was told by a MS technical architect when I attended an event on UEV. He said that they are removing support for Roaming and Mandatory in favour of UEV.

Posted
In a school? How? i must admit that before working here, i'd never touched a mandatory profile and never used a roaming one for years. Theyre a right kerfuffle, but with 1200 kids and 60 gb HDDS on classroom PC's..... my options are llimited.

 

UE-V perhaps? I've not looked into that.

 

HDDs? Well, you really need to be advocating for 240GB SSDs replacement now. And then drop down to 120GB if really tight budget. Point out the 100s of hours saved per year * cost per hour of pupils/staff.

Posted
HDDs? Well, you really need to be advocating for 240GB SSDs replacement now. And then drop down to 120GB if really tight budget. Point out the 100s of hours saved per year * cost per hour of pupils/staff.

 

Sorry, 60gb SSD's in most classrooms. Only physical HDD's are in offices and are being eradicated along with the windows 10 rollout.

 

Ive now got a provisional fix in place. This runs at logon and startup;

 

Get-ChildItem -Path c:\users\staff* -Directory | Remove-Item -Recurse -Force

 

This gets rid of most cruft except the >256 character folders which need attention. Thats a user level reorganistion needed there. or i may try Delprof2 again.

 

Still nowhere nearer finding out why its creating new folders in the 1st place. There must be a log somewhere. Test user had no long file paths and still got one. Thats for Microsoft to answer for my £400 phonecall.

Posted
i can speculate at the why. you log off as staffuser but because onedrive is running it cant completely close all thew files so the profile cant be removed. so user logs on again there is 1/2 a profile it creates a new one repeat to fade
Posted

It still does this when you are using local profiles, so it's not a mandatory/roaming issue. OneDrive leaves things behind that upset windows and it makes a new folder, the problem is the algorithm has changed for some reason from Username.Domain.000, Username.Domain.001 to Username.Domain.000.001

 

One potential workaround is if you can tell OneDrive files on demand to use a different directory for the file location (so make c:\OneDrive or something, point it to C:\OneDrive\%Username%) then at least when the profile screws up there's nothing left behind to cause it to append the next number?

Posted
It still does this when you are using local profiles, so it's not a mandatory/roaming issue. OneDrive leaves things behind that upset windows and it makes a new folder, the problem is the algorithm has changed for some reason from Username.Domain.000, Username.Domain.001 to Username.Domain.000.001

 

One potential workaround is if you can tell OneDrive files on demand to use a different directory for the file location (so make c:\OneDrive or something, point it to C:\OneDrive\%Username%) then at least when the profile screws up there's nothing left behind to cause it to append the next number?

 

Wont it just create 001, 001.003, 001.002.003, versions of the folders in a new location? I'm going to see if my brute force powershell approach helps tiil Microsoft come up with a more elegant solution.

Posted
I wouldn't just delete the local profiles use delprof2 run as system not a local admin. FSLogix containers have been acquired by MS. If you have Microsoft 365 E3 or above you can use them. Basically roams the profile as a vhdx but under the OS. The OS just thinks its a local profile. The real question is which settings need roaming?
Posted
Wont it just create 001, 001.003, 001.002.003, versions of the folders in a new location? I'm going to see if my brute force powershell approach helps tiil Microsoft come up with a more elegant solution.

Shouldn't do. It'd be saving OneDrive to c:\onedrive\%username% and the Windows user profile to c:\users\%username% with no onedrive folders left there to get in the way.

This won't fix the current mess obviously but just an idea for how to stop it happening over and over once you've cleaned this up.

Posted
Hello all

 

First post here and it’s a doozy.

 

Mid-sized secondary school just rolling out Windows 10 LTSC with staff & pupils using mandatory profiles. Usual kerfuffle with printers vanishing and now, as I trial OneDrive as a replacement for the horrible OneDrive mapper script, (since MS finally released the ‘per machine’ version), I’ve hit a new problem.

 

Do you have the GPO set to remove inactive profiles after X days? We got this exact behavior when we had that GPO set to too short of a time and what was happening was that Windows was removing the profile from the registry and deleting everything in the C:\Users\{username} folder except for their Onedrive folder which it was failing to do for an as-yet unknown reason. When we increased the length of time in the GPO the problem went away.

Posted
Do you have the GPO set to remove inactive profiles after X days? We got this exact behavior when we had that GPO set to too short of a time and what was happening was that Windows was removing the profile from the registry and deleting everything in the C:\Users\{username} folder except for their Onedrive folder which it was failing to do for an as-yet unknown reason. When we increased the length of time in the GPO the problem went away.[/quote

 

Yes, we do. Set to 2 days. I just figured it wasnt working at all. Along with the "Delete cached copies of roaming profiles" GPO.

 

Profiles in registry are being deleted, its just the folders being left behind.

 

How many days did you set yours to to get it working?

Posted
We originally had ours set to 7 days and had to push it out at least far enough to cover a 2-week timetable cycle plus 1 week for half terms so in the end we went for 28 days. It's been set that way since last October and we haven't had a single case of drives running out of space due to cached profiles etc. and that's on machines that only have 120GB SSDs fitted.
Posted

I've got 60gb SSD's in some classrooms so i have to build by images and plan loadouts, etc round that.

 

There two folders that seem to get orphaned even with "delete cashed profiles" GPO on. appdata/ConnectedDevicesPlatforn & Onedrive.

If i disable the ConnectedDevicesPlatform service thats sorted, (think it's for xbox conectivity?)

I want onedrive though so i can finally get rid of the horrible OnedriveMapper script i inherited.

Posted

I think you'll get rid of the Onedrive folders that are orphaned by running delprof2 (https://helgeklein.com/free-tools/delprof2-user-profile-deletion-tool/) at startup daily on the PCs and remove your GPO. If you run delprof2 with the /d parameter set to two days you should achieve the same effect as the intended effect of the GPO.

 

Alternatively maybe a startup script that checks folder in C:\Users to see if Onedrive - YourSchoolName is the only folder inside a user folder and if so, delete that folder.

Posted
is it worth rebooting before deleting profiles?

 

My ps script tries to delete them at start-up. Something odd about the OneDrive folders though as I get the "Directory is not empty" error. You sometimes have to log on locally and delete.

 

I can get it down to two folders with aggressive PowerShell. the user and the user.DOMAIN and after a reboot one of them goes, but not both, so there’s always two as Windows cant for some reason relog to the same folder so it recreates the other.

 

I’ve got it down to two from 20-odd but the problem is still there. MS don’t seem to have a clue. "Uninstall your Antivirus" is all I’ve had from them in a week for £400.

Posted
Odd, is there a service that should be disabled first? Only 2 things I can think of that would prevent deletion is the file has an open handle, or permissions.
Posted
Odd, is there a service that should be disabled first? Only 2 things I can think of that would prevent deletion is the file has an open handle, or permissions.

It could be permissions in the appdata folder as we use mandatory profiles and i didn’t set anything explicit for that but OneDrive? That's separate from the mandatory profile hive so I think it’s either got something open or it’s a OneDrive client thing as it’s designed to cache locally opened docs to speed up future access.

 

There should be a log somewhere for when it’s creating a new profile each time but I’ve not found it and neither have MS. I’ve halted the OneDrive rollout till this is resolved.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...