The User Profile Service service failed the logon

*** Update – this still happens with Internet Explorer 11 ***

I’ve seen this problem with SCCM 2007 and 2012 when distributing the IEAK versions of Internet Explorer 9 and 10 via an OSD Task Sequence.


Quite simply any domain account receives the ‘The User Profile Service service failed the logon’ error message and you get thrown back to the login screen.

To resolve the problem add in a Task Sequence script to remove the file C:\Users\Default\AppData\Local\Microsoft\Windows\Temporary Internet Files\SQM\iesqmdata_setup0.sqm, which is created by either version of the install, and your problem goes away.



    every other site had solution to work in registry to fix the SID issue…. which I knew was wrong because the profile had not been created yet…

    KUDOS and thanks! I now have a go to place for some q and a.

  2. Hi guys,
    Just wondering where in the Task Sequence do you stick this cmd? I’ve tried it straight after the IE 10 install but it fails and crashes the OSD. I logon to the machine afterward and the “Temporary Internet Files\SQM\iesqmdata_setup0.sqm” folder structure is their.
    Any pointer would be great full

    1. You are correct this should be done post IE9 or 10 install. I tend to put the deletion of the SQM file at the end of my TS as a kind of post install clean up.

      I add a Run Command Line task and add in the following in the command line

      cmd /c del "C:\Users\Default\AppData\Local\Microsoft\Windows\Temporary Internet Files\SQM\iesqmdata_setup0.sqm"

      Hope this helps.

  3. Help please. I have this error and it is not a new user just suddenly happened 😦 Im not at all technical and don’t know where to put your command. I have windows vista home. Please can you help. Thanks

    1. Hi Julie,
      The problem you are having is very different to the issue I am describing on the blog.

      Take a look at the following YouTube video carefully and follow the steps. Hopefully this will help you with your problem.


    1. Rob,

      SQM files are log files created by the Service Quality Monitor program that records events on Windows. The data can be sent to Microsoft to fix and improve software. Safe to delete


  4. I have added the following command after my IE10 installation and it causes my TS to fail:
    cmd /c del “C:\Users\Default\AppData\Local\Microsoft\Windows\Temporary Internet Files\SQM\iesqmdata_setup0.sqm”
    Do I need to run this as a specific user? I even placed a ‘Restart Computer’ command before it, but that didn’t seem to change the behavior.

  5. Same issue here– adding a Run Command Line step (cmd.exe /C del “C:\Users\Default\AppData\Local\Microsoft\Windows\Temporary Internet Files\SQM\iesqmdata_setup0.sqm”) into the Task Sequence after a step that installs IE10 causes the Task Sequence to fail. Looking through the local SMSTS.log I find that the command returns 1, and the step failed with error 00000001 “Incorrect Function”. Things tried:

    – Manually deleting the file via F8 *during* the Task Sequence (before the Run Command Line step): works every time
    – W/ and W/O the /C switch
    – W/ and W/O “.EXE” for the command shell
    – W/ and W/O “Disable 64-bit file system redirection (although I don’t think its applicable to this particular directory)
    – Adding a Restart between the IE10 install and the Run Command Line steps

    Still no dice.

    The only way I’ve been able to get around it is to use powershell instead in the Run Command Line step:
    powershell.exe remove-item ‘C:\Users\Default\AppData\Local\Microsoft\Windows\Temporary Internet Files\SQM\iesqmdata_setup0.sqm’

    PS: absolutely *love* M$ products

  6. Jared,

    Thanks for this. Very interesting. I take it the PowerShell command was run straight after the IE install similar to how you ran the command line task?

    1. Yep, immediately after the install IE10 step – its even the same “Run Command Line” step I had added previously; just switched out the cmd for powershell and viola~

      1. I ended up creating a ‘Program” that ran the command line as noted above and added it to the task sequence. This succeeded as well. I like the Powershell option better and seems a bit more streamlined.
        Thanks fellas!

  7. EXACTLY our problem and FIX!!! Thanks! Had a bunch of computers on campus that were getting that error…. had just rolled out IE9 yesterday via SCCM 2012.

  8. I had it the same problem with new user on the computer. All users who had profile on the computer before was ok. i dont try delete the file. I make startup script and add rights on the file. Offcourse. delete the file, is better solution.

    %windir%\system32\icacls.exe "C:\Users\Default\AppData\Local\Microsoft\Windows\Temporary Internet Files\SQM\iesqmdata_setup0.sqm" /grant "Users":r

  9. I have the same error but there is no Temporary Internet Files folder in my default profile folder…….? I am stuck!

      1. I’m having the same issue as Emil – no Temporary Internet Files directory. This error is coming up on every single OSD I have at the moment. I am not installing any IE versions during the deployment – IE11 is included withing the base image (Windows 8.1 Update). When logging in with the local administrator account I’m greeted with a message saying that “C:\Windows\system32\config\systemprofile\Desktop is missing” or something like that. Sure enough, the folder is not there. I’ve added it and rebooted, seems to rid of the message, but it’s still logging in with a temp profile.

        ..and even after all this, cannot log in with a domain account. About to start my image over from scratch with the newest ISO released from Microsoft in April.

      2. MIchael,

        This is interesting. One thing to note is that the issue contained in the article has been tested and fixed on Windows 7 with IE9 and 10.

        The problem you are getting therefore could therefore manifest itself differently with Win 8.1 and IE11. At this stage I don’t have an answer for you.

      3. Turns out it was one of my application installs that installs App-V as a requirement to the virtualized applications. Once I stopped installing this app, the issue went away. Too bad I spent my whole weekend rebuilding a reference image. :/

        Please note, as SCCMentor pointed out, this is on a Windows 8.1 image with Update 1.

      4. Michael, This is interesting. Can you elaborate more here as this could assist anyone who encounters the same issue? Thanks Paul

  10. This is the first time I ran into this profile problem and most of the sites recommend the registry fix which it didn’t work for me. I am so so so glad I found your blog. It saved me the headache of reinstalling Windows. Thanks!

  11. I’m still having dramas with this annoyingly – I know that the .sqm file needs to be deleted, but I can’t seem to wrangle a way to delete it during the task sequence (this is an OSD deployment).

    The .sqm file doesn’t seem to be created until after the first reboot, and a reboot in the TS doesn’t seem to count toward that. Because of this I can’t add a step to delete the file (or update it’s permissions).

    Is anyone able to shed any light on this (e.g. a sample task sequence that is working for them) so I can figure out what I’m doing wrong? I’m installing IE10 at the end of our deployment sequence if that’s useful to know.

    1. Face – I had my IE install quite early in the TS and the sqm deletion one of the last steps to be performed.

      Multiple reboots occurred during the OSD and hence this is probably why it worked without fail.

      1. I’ll give that a try, thanks. The only reason we’ve placed it at the end of the TS is because it’s the latest thing we’ve added anyway, so hopefully it’s just an issue of timing.

      2. I would think so. I tend to put any IE install at the start of the TS so any dependencies trickle through – flash, java etc.

  12. This fixed my issue wonderfully… but created another. Now when you open IE, it no longer automatically authenticates with the intranet homepage. Any thoughts on this?

    1. I do not have an answer as to why deleting that file created created that issue for me, but I found another solution that works better, I my case. I just run this line after installation, and have no need to delete the file.

      ICACLS "C:\Users\Default\AppData\Local\Microsoft\Windows\Temporary Internet Files\SQM\*" /q /c /t /reset

      A description of why this works can be found here:

      Thanks for your blog, it pushed me in the right direction.

  13. I cant get the run command line step working, Always getting 0x80004005. I tried both removing file using powershell and the ICACLS method, but both doesnt work. Any ideas?

  14. Is there a way to prevent the SQM files from appearing in the 1st place?
    I’ve read somewhere that they are tied with the CEIP(aka Microsoft Customer Experience Improvement Program).

    My Senior guys tasked me with finding out if there is a way to prevent this from happening as opposed to finding a way to eliminate it after the fact.

    I was just wondering if there was an update we could roll back as we are starting to see these a little more frequently in some of our new builds.
    Thanks in advance!!!

    1. Mike,

      For IE try adding the following reg key to the TS before installing “HKLM\Registry\Machine\Software\Microsoft\SQMClient\Windows\CEIPEnable” to 0

      I haven’t tried this myself but did read about it recently.

  15. I am running a Package Deployment of IE 11 not in a task sequence and have the same symptoms. Is there a way to apply your fix with that method of deployment?

    I created the msi with IEAK and want to deploy it to all my users. In testing I sent it to a Windows 7 Ent. SP1 PC and then only new users to that PC are getting the User Profile Service Failed message.

      1. Thanks, I figured as much. Unfortunately this solution basically eliminates all the customization that the IEAK tool made. Rendering it useless!

  16. Everything as far as I can tell. I had it set to not ask OOB questions, it now does, favorites and the default web page are also gone.

      1. no, deleting the file manually removes all of the customization but allows the new user to log in.

  17. Thanks, in further testing scripting the removal of the sqm file the customization’s remain. Perhaps there was another issue on previous tests. Thanks again for your help.

  18. I know that this is an old article but I am posting as maybe it might help someone else who experiences this issue. I am using SCCM 2012 R2 and was trying to install IE11 with IEAK as part of an OSD TS and had this issue. You’re post helped me resolve the issue (THANKS!!).

    At first, the DEL command didn’t work for me and so I tried the registry hack then the ICALCS command and they weren’t helping to resolve the issue either. So I went back to testing the original recommendation using the DEL command and it still wasn’t working. Then I found that because I was copying the command directly from your post, the copy was changing what should have been double quote marks into something else (so when I pasted the copied command into my batch file, it pasted the wrong double quote marks and that is why it wasn’t deleting the file).

    So anyone else who has the issue where the DEL command doesn’t work, if you copied the command from this article, make sure that you ensure it paste using the correct characters.

    Thanks for the article!!

  19. Awesome!!!! Works very fine here. After some days trying by other ways, y found this. Thank for share this.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s