SOLVED
Home

Issue with date modified for NTUSER.DAT

%3CLINGO-SUB%20id%3D%22lingo-sub-102438%22%20slang%3D%22en-US%22%3EIssue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-102438%22%20slang%3D%22en-US%22%3E%3CP%3EIs%20Microsoft%20aware%20of%20an%20issue%20with%20various%20Windows%2010%20processes%20causing%20the%26nbsp%3Bdate%20modified%20timestamp%20on%20the%20NTUSER.DAT%20file%20in%20unused%20profiles%20to%20change%3F%20We%20have%20specifically%20noticed%20that%20installation%20of%20cumulative%20updates%20modifies%20this%20file%20in%20all%20profiles%2C%20but%20there%20are%20other%20processes%20(I'm%20guessing%20scheduled%20tasks%20but%20I%20haven't%20found%20which%20ones)%20that%20do%20this%20too.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20particularly%20a%20problem%20in%20Education%20as%20we%20use%20the%20%22Delete%20user%20profiles%20older%20than%20a%20specified%20number%20of%20days%20on%20a%20system%20restart%22%20GPO%20setting%20to%20clean%20up%20old%20profiles%20on%20Lab%20and%20Classroom%20computers%20and%20that%20policy%20relies%20on%20the%20timestamp%20on%20the%20NTUSER.DAT%20file%20to%20determine%20the%20age%20of%20the%20profile.%20(The%20USMT%20tool%20also%20uses%20that%20file%20and%20timestamp%20when%20you%20specify%20to%20only%20capture%20profiles%20used%20within%20the%20last%20XX%20days.)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20reference%2C%20the%26nbsp%3Bdate%20modified%20timestamp%20on%20the%20profile%20folder%20in%20the%20Users%20directory%20does%20accurately%20reflect%20the%20last%20time%20the%20profile%20was%20used.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-382624%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-382624%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F216493%22%20target%3D%22_blank%22%3E%40Michael%20Green%3C%2FA%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20please%20explain%20step%20by%20step%20how%20you%20made%20it%20work%3F%20I%20created%20the%20Computer%20Policy%20%22delete%20user%20profiles%20older%20than..%22%20and%20then%20I%20also%20configured%20the%20startup%20script%20using%20the%20powershell%20script%20file.%20But%20nothing%20happens.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20could%20help%20I%20would%20be%20glad.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-301999%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-301999%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20so%20much%20for%20this%20script%2C%20it%20saved%20me%20a%20ton%20of%20troubleshooting%20time!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-286925%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-286925%22%20slang%3D%22en-US%22%3E%3CP%3EI%20was%20going%20to%20test%20run%20the%20script%20on%20a%20subject%20machine%2C%20when%20I%20discovered%20that%20the%20timestamp%20for%20both%20the%20chosen%20profile%20folders%20and%20the%20corresponding%20NTUSER.DAT%20files%20were%20exactly%20the%20same.%20The%20time%20stamp%20for%20both%20was%20more%20than%20one%20month%20old%20and%20they%20should%20have%20been%20deleted%20already%2C%20but%20they%20were%20still%20there.%20Thus%20far%2C%20I've%20found%20articles%20claiming%20that%20either%20the%20anti-virus%20software%20is%20to%20blame%20or%20the%20Windows%20Update%20service%20is%20to%20blame.%20In%20the%20test%20case%20I%20was%20working%20with%2C%20there%20is%20active%20anti-virus%20software%2C%20but%20the%20Windows%20Updates%20are%20temporarily%20disabled%20through%20Group%20Policy%20settings.%20But%2C%20again%2C%20the%20timestamps%20don't%20appear%20to%20be%20changing%2C%20anyway.%20Sounds%20like%20a%20Microsoft%20glitch%2C%20to%20me%2C%20or%20perhaps%20I'm%20misunderstanding%20something.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-284071%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-284071%22%20slang%3D%22en-US%22%3E%3CP%3EYes%2C%20the%20script%20is%20used%20in%20combination%20with%20the%20GPO%20setting.%20We%20still%20have%20the%20%22Delete%20user%20profiles%20older%20than%20a%20specified%20number%20of%20days%20on%20system%20restart%22%20configured.%20The%20PowerShell%20script%20to%20adjust%20the%20timestamps%20on%20the%20NTUser.dat%20files%20is%20executed%20on%20a%20daily%20schedule%20by%20ConfigMgr%20using%20a%20package%20with%20the%20script%20as%20the%20source%20file%20and%20a%20program%20running%20the%20following%20command%20line%3A%26nbsp%3B%3CFONT%3E%22C%3A%5CWindows%5CSystem32%5CWindowsPowerShell%5Cv1.0%5Cpowershell.exe%22%20-file%20Change_NTUSER_Date.ps1%3C%2FFONT%3E%3C%2FP%3E%3CP%3EThe%20program%20is%20deployed%20to%20always%20rerun.%20You%20could%26nbsp%3Balso%20accomplish%20this%20with%20a%20scheduled%20task%26nbsp%3Brunning%20the%26nbsp%3Bscript%20on%20each%20computer%20as%20well.%20It%20seemed%20easiest%20to%20use%20ConfigMgr%20to%20handle%20the%20distribution%20and%20execution%20of%20the%20script%20which%20also%20makes%20it%20easy%20to%20change%2C%20if%20needed.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-282260%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-282260%22%20slang%3D%22en-US%22%3E%3CP%3ECan%20you%20tell%20me%20how%20you%20put%20this%20in%20place%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20it%20work%20side%20by%20side%20with%20the%20existing%20GPO%20or%2C%20is%20this%20a%20stand%20alone%20script%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20are%20having%20issue%20you%20are%2Fwere%20having.....%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-238082%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-238082%22%20slang%3D%22en-US%22%3E%3CP%3EJust%20want%20to%20say%20a%20big%20thanks%20for%20the%20powershell%20script.%26nbsp%3B%20I've%20been%20tearing%20my%20hair%20out%20with%20this%20problem%20for%20several%20months.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20changed%20over%20some%20of%20our%20school%20estate%20to%20SSD's%20last%20year%20and%20their%20getting%20filled%20up%20quite%20quickly%20now%20and%20I%20couldn't%20work%20out%20why%20the%20normal%20Group%20Policy%20for%20removing%20profiles%20wasn't%20working.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EChanging%20to%20the%20date%20on%20the%20folder%20isn't%20perfect%20as%20something%20else%20sometimes%20modified%20it%20as%20well%20but%20it's%20a%20step%20in%20the%20right%20direction.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHopefully%20MS%20can%20sort%20it%20out.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-197629%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-197629%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20are%20having%20this%20issue%20also%20with%20server%202012R2%20RDS.%3C%2FP%3E%3CP%3EAt%20reboot%20time%20user.dat%20timestamp%20is%20updated%20and%20profiles%20are%20never%20cleaned%20up%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-181859%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-181859%22%20slang%3D%22en-US%22%3E%3CP%3EJust%20adding%20we%20have%20the%20same%20problem%2C%20Windows%2010%20Pro%201703%20and%201709.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-172218%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-172218%22%20slang%3D%22en-US%22%3E%3CP%3EI%20wanted%20to%20post%20and%20say%20that%20we%20are%20experiencing%20this%20same%20issue%20and%20wanted%20to%20see%20if%20anyone%20had%20any%20new%20information%20on%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20are%20running%201703%20Enterprise%20and%20are%20becoming%20increasing%20frustrated%20with%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-166653%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-166653%22%20slang%3D%22en-US%22%3E%3CP%3Ethanks%2C%20I%20will%20try%20this%20and%20give%20you%20feedback!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-163685%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-163685%22%20slang%3D%22en-US%22%3E%3CP%3EHere%20is%20the%20code%20from%20the%20script%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%23Purpose%3A%20Used%20to%20set%20the%20ntuser.dat%20last%20modified%20date%20to%20that%20of%20the%20last%20modified%20date%20on%20the%20user%20profile%20folder.%3CBR%20%2F%3E%23This%20is%20needed%20because%20windows%20cumulative%20updates%20are%20altering%20the%20ntuser.dat%20last%20modified%20date%20which%20then%20defeats%3CBR%20%2F%3E%23the%20ability%20for%20GPO%20to%20delete%20profiles%20based%20on%20date%20and%20USMT%20migrations%20based%20on%20date.%3C%2FP%3E%0A%3CP%3E%24ErrorActionPreference%20%3D%20%22SilentlyContinue%22%3CBR%20%2F%3E%24Report%20%3D%20%24Null%3CBR%20%2F%3E%24Path%20%3D%20%22C%3A%5CUsers%22%3CBR%20%2F%3E%24UserFolders%20%3D%20%24Path%20%7C%20GCI%20-Directory%3C%2FP%3E%0A%3CP%3EForEach%20(%24UserFolder%20in%20%24UserFolders)%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%24UserName%20%3D%20%24UserFolder.Name%3CBR%20%2F%3EIf%20(Test-Path%20%22%24Path%5C%24UserName%5CNTUSer.dat%22)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%24Dat%20%3D%20Get-Item%20%22%24Path%5C%24UserName%5CNTUSer.dat%22%20-force%20%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%24DatTime%20%3D%20%24Dat.LastWriteTime%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20If%20(%24UserFolder.Name%20-ne%20%22default%22)%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%24Dat.LastWriteTime%20%3D%20%24UserFolder.LastWriteTime%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Write-Host%20%24UserName%20%24DatTime%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Write-Host%20(Get-item%20%24Path%5C%24UserName%20-Force).LastWriteTime%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%24Report%20%3D%20%24Report%20%2B%20%22%24UserName%60t%24DatTime%60r%60n%22%20%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%24Dat%20%3D%20%24Null%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3CBR%20%2F%3E%7D%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-161383%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-161383%22%20slang%3D%22en-US%22%3E%3CP%3Ehi%20Joe%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20struggle%20with%20the%20same%20problem%20in%20our%20school.%20%26nbsp%3BCould%20you%20share%20the%20powershell%20script%20with%20us%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-159462%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-159462%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20the%20update%20and%20I%20look%20forward%20to%20seeing%20if%20you're%20able%20to%20get%20a%20resolution.%20I%20can%20also%20confirm%20this%20is%20not%20caused%20by%20antivirus.%20We%20have%20Defender%20completely%20disabled%20via%20GPO%20and%20I%20had%20McAfee%20VSE%20uninstalled%20at%20the%20time%20of%20my%20testing.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-159273%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-159273%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20currently%20having%20the%20same%20issue%20and%20have%20a%20call%20open%20with%20Microsoft%20about%20it.%20This%20has%20been%20ongoing%20now%20for%20months.%20I%20initially%20suspected%20windows%20updates%20and%20Store%20updates%20are%20changing%20the%20.dat%20files%2C%20which%20makes%20some%20sense.%20Looking%20at%20event%20logs%20you%20can%20see%20the%20user%20registry%20hives%20being%20modified%20and%20usually%20preceded%20by%20windows%20update%20client%20kicking%20in%20to%20download%20something.%3C%2FP%3E%0A%3CP%3EMicrosoft%20have%20been%20round%20the%20houses%20trying%20to%20blame%20everything%20but%20the%20OS%2C%20suggesting%20Anti-Virus%20software%20for%20example%2C%20but%20cant%20be%20that%20with%20no%20third%20party%20AV%20on%20the%20machine.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20can%20confirm%20that%20this%20problem%20has%20persisted%20in%201709%20as%20well.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECurrently%20away%20to%20use%20process%20monitor%20to%20confirm%20what%20is%20changing%20the%20registry.%3C%2FP%3E%0A%3CP%3EMy%20current%20feeling%20is%20that%20this%20is%20expected%20behaviour%20and%20no%20one%20wants%20to%20admit%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EJust%20to%20add%2C%20I%20am%20only%20seeing%20this%20behaviour%20since%20going%20to%201703%20in%20the%20Summer%20as%20we%20have%20switched%20from%20roaming%20profiles%20to%20local%20profiles%20and%20UEV%2C%20and%20we%20were%20wiping%20all%20roaming%20profiles%20remnants%20using%20delprof%20tool%20on%20startup%20prior%20to%20the%20summer%20so%20machines%20were%20clean%20of%20profiles%20on%20every%20boot.%20This%20is%20not%20really%20an%20option%20if%20you%20are%20using%20local%20profiles%2C%20hence%20the%20switch%20to%20the%20GPO.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-146924%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-146924%22%20slang%3D%22en-US%22%3E%3CP%3EI%20did%20submit%20this%20in%20the%20Feedback%20Hub%20app%205%20months%20ago.%20It%20has%201%20upvote%20and%20no%20comments.%20I%20have%20not%20tested%20to%20see%20if%20this%20was%20fixed%20in%201709.%20We%20developed%20a%20PowerShell%20script%20that%20loops%20through%20the%20user%20profiles%20and%20sets%20the%20ntuser.dat%26nbsp%3Bdate%20modified%20value%20to%20the%26nbsp%3Bdate%20modified%20value%20from%20the%20user%20profile%20folder.%20We%20just%20run%20this%20on%20a%20set%20schedule%20for%20any%20computers%20where%20we're%20using%20the%20profile%20deletion%20GPO%20setting.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-144185%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-144185%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EI'm%20currently%20running%20into%20this%20exact%20issue.%20Was%20there%20a%20bug%20report%20submitted%20or%20were%20you%20able%20to%20find%20a%20fix%3F%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-102441%22%20slang%3D%22en-US%22%3ERE%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-102441%22%20slang%3D%22en-US%22%3EThanks%20for%20this%20feedback%2C%20Joe%20-%20I%20can%20pass%20this%20along%20to%20our%20team.%20If%20you%20are%20able%20to%2C%20please%20submit%20this%20feedback%20to%20the%20Windows%20Feedback%20hub%20-%20this%20is%20the%20best%20way%20to%20get%20bugs%20like%20this%20to%20our%20engineering%20teams.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-825401%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20date%20modified%20for%20NTUSER.DAT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-825401%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F37483%22%20target%3D%22_blank%22%3E%40Joe%20Friedel%3C%2FA%3E%26nbsp%3BI%20realize%20you%20posted%20this%20a%20year%20and%20a%20half%20ago%20but%20would%20you%20mind%20sharing%20that%20powershell%20script%20that%20loops%20through%20user%20profiles%20and%20updates%20the%20ntuser.dat%20last%20modified%20date%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Is Microsoft aware of an issue with various Windows 10 processes causing the date modified timestamp on the NTUSER.DAT file in unused profiles to change? We have specifically noticed that installation of cumulative updates modifies this file in all profiles, but there are other processes (I'm guessing scheduled tasks but I haven't found which ones) that do this too. 

 

This is particularly a problem in Education as we use the "Delete user profiles older than a specified number of days on a system restart" GPO setting to clean up old profiles on Lab and Classroom computers and that policy relies on the timestamp on the NTUSER.DAT file to determine the age of the profile. (The USMT tool also uses that file and timestamp when you specify to only capture profiles used within the last XX days.)

 

For reference, the date modified timestamp on the profile folder in the Users directory does accurately reflect the last time the profile was used.

18 Replies
Highlighted
Thanks for this feedback, Joe - I can pass this along to our team. If you are able to, please submit this feedback to the Windows Feedback hub - this is the best way to get bugs like this to our engineering teams.
Highlighted

I'm currently running into this exact issue. Was there a bug report submitted or were you able to find a fix? 

Highlighted

I did submit this in the Feedback Hub app 5 months ago. It has 1 upvote and no comments. I have not tested to see if this was fixed in 1709. We developed a PowerShell script that loops through the user profiles and sets the ntuser.dat date modified value to the date modified value from the user profile folder. We just run this on a set schedule for any computers where we're using the profile deletion GPO setting.

Highlighted

I am currently having the same issue and have a call open with Microsoft about it. This has been ongoing now for months. I initially suspected windows updates and Store updates are changing the .dat files, which makes some sense. Looking at event logs you can see the user registry hives being modified and usually preceded by windows update client kicking in to download something.

Microsoft have been round the houses trying to blame everything but the OS, suggesting Anti-Virus software for example, but cant be that with no third party AV on the machine.

 

I can confirm that this problem has persisted in 1709 as well. 

 

Currently away to use process monitor to confirm what is changing the registry.

My current feeling is that this is expected behaviour and no one wants to admit it.

 

Just to add, I am only seeing this behaviour since going to 1703 in the Summer as we have switched from roaming profiles to local profiles and UEV, and we were wiping all roaming profiles remnants using delprof tool on startup prior to the summer so machines were clean of profiles on every boot. This is not really an option if you are using local profiles, hence the switch to the GPO. 

 

 

Highlighted

Thanks for the update and I look forward to seeing if you're able to get a resolution. I can also confirm this is not caused by antivirus. We have Defender completely disabled via GPO and I had McAfee VSE uninstalled at the time of my testing. 

Highlighted

hi Joe

 

We struggle with the same problem in our school.  Could you share the powershell script with us?

 

Solution

Here is the code from the script:

 

#Purpose: Used to set the ntuser.dat last modified date to that of the last modified date on the user profile folder.
#This is needed because windows cumulative updates are altering the ntuser.dat last modified date which then defeats
#the ability for GPO to delete profiles based on date and USMT migrations based on date.

$ErrorActionPreference = "SilentlyContinue"
$Report = $Null
$Path = "C:\Users"
$UserFolders = $Path | GCI -Directory

ForEach ($UserFolder in $UserFolders)
{
$UserName = $UserFolder.Name
If (Test-Path "$Path\$UserName\NTUSer.dat")
    {
    $Dat = Get-Item "$Path\$UserName\NTUSer.dat" -force
    $DatTime = $Dat.LastWriteTime
    If ($UserFolder.Name -ne "default"){
        $Dat.LastWriteTime = $UserFolder.LastWriteTime
    }
    Write-Host $UserName $DatTime
    Write-Host (Get-item $Path\$UserName -Force).LastWriteTime
    $Report = $Report + "$UserName`t$DatTime`r`n"
    $Dat = $Null
    }
}

Highlighted

thanks, I will try this and give you feedback!

Highlighted

I wanted to post and say that we are experiencing this same issue and wanted to see if anyone had any new information on it.

 

We are running 1703 Enterprise and are becoming increasing frustrated with it.

Highlighted

Just adding we have the same problem, Windows 10 Pro 1703 and 1709.

Highlighted

We are having this issue also with server 2012R2 RDS.

At reboot time user.dat timestamp is updated and profiles are never cleaned up

 

 

Highlighted

Just want to say a big thanks for the powershell script.  I've been tearing my hair out with this problem for several months.

 

We changed over some of our school estate to SSD's last year and their getting filled up quite quickly now and I couldn't work out why the normal Group Policy for removing profiles wasn't working.

 

Changing to the date on the folder isn't perfect as something else sometimes modified it as well but it's a step in the right direction.

 

Hopefully MS can sort it out.

Highlighted

Can you tell me how you put this in place?

 

Does it work side by side with the existing GPO or, is this a stand alone script?

 

We are having issue you are/were having.....

Highlighted

Yes, the script is used in combination with the GPO setting. We still have the "Delete user profiles older than a specified number of days on system restart" configured. The PowerShell script to adjust the timestamps on the NTUser.dat files is executed on a daily schedule by ConfigMgr using a package with the script as the source file and a program running the following command line: "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -file Change_NTUSER_Date.ps1

The program is deployed to always rerun. You could also accomplish this with a scheduled task running the script on each computer as well. It seemed easiest to use ConfigMgr to handle the distribution and execution of the script which also makes it easy to change, if needed.

Highlighted

I was going to test run the script on a subject machine, when I discovered that the timestamp for both the chosen profile folders and the corresponding NTUSER.DAT files were exactly the same. The time stamp for both was more than one month old and they should have been deleted already, but they were still there. Thus far, I've found articles claiming that either the anti-virus software is to blame or the Windows Update service is to blame. In the test case I was working with, there is active anti-virus software, but the Windows Updates are temporarily disabled through Group Policy settings. But, again, the timestamps don't appear to be changing, anyway. Sounds like a Microsoft glitch, to me, or perhaps I'm misunderstanding something.

Highlighted

Thanks so much for this script, it saved me a ton of troubleshooting time!

Highlighted

@Michael GreenHi,

 

Can you please explain step by step how you made it work? I created the Computer Policy "delete user profiles older than.." and then I also configured the startup script using the powershell script file. But nothing happens.

 

If you could help I would be glad.

 

Thanks.

Highlighted

@Joe Friedel I realize you posted this a year and a half ago but would you mind sharing that powershell script that loops through user profiles and updates the ntuser.dat last modified date?

Related Conversations