Log on as batch task with User Profile Disks

We have a Windows Server 2012 R2 Remote Desktop deployment, where we use user profile disks stored on a central file server.

We are trying to run a scheduled tasks as a user, while they are logged off.

When the tasks runs, I can see an event in event viewer that says it was unable to load the user's profile, and as such, the Excel add in that is part of the tasks is not enabled, and as such the tasks fails to complete successfully.

Is this a limitation of the user profile disks? Can the server load the user profile disk even without the user logging in interactively?

Cheers, Eds

April 14th, 2015 10:30am

Hi Eds,

To better troubleshoot the scheduled task issue, please locate the problematic task from Task Scheduler, under its History tab to see if the failing reason is logged.

More information for you:

Troubleshooting Task Scheduler

https://technet.microsoft.com/en-us/library/cc721846.aspx?f=255&MSPPError=-2147217396

Best Regards,

Amy

Free Windows Admin Tool Kit Click here and download it now
April 15th, 2015 9:03am

Hi Amy,

The task itself isn't failing, but the action the task executes fails, because it has logged in with a temporary profile.

The last run time of the task was 14/04/2015 10:49:00, completing at 10:49:02. At this time, there is an event in the event viewer:

As the tasks is logging in with a temporary profile, the Excel add-ins that user has are not loaded, and the action fails. This is the log from the application itself that is trying to run:

The report 'PATH_TO_SPREADSHEET.xlsx' failed to run with the following error:  'Cannot run the macro 'JetMenu'. The macro may not be available in this workbook or all macros may be disabled.'.

The macro it is referring to is an Excel reporting add-in.

I think what I need to happen, is for the server to mount the users User Profile Disk, so that it does not load a temporary profile.

Many thanks

Eds

April 16th, 2015 8:31am

Hi Amy,

The task itself isn't failing, but the action the task executes fails, because it has logged in with a temporary profile.

The last run time of the task was 14/04/2015 10:49:00, completing at 10:49:02. At this time, there is an event in the event viewer:

As the tasks is logging in with a temporary profile, the Excel add-ins that user has are not loaded, and the action fails. This is the log from the application itself that is trying to run:

The report 'PATH_TO_SPREADSHEET.xlsx' failed to run with the following error:  'Cannot run the macro 'JetMenu'. The macro may not be available in this workbook or all macros may be disabled.'.

The macro it is referring to is an Excel reporting add-in.

I think what I need to happen, is for the server to mount the users User Profile Disk, so that it does not load a temporary profile.

Many thanks

Eds

Free Windows Admin Tool Kit Click here and download it now
April 16th, 2015 8:31am

Hi Eds,

I think what I need to happen, is for the server to mount the users User Profile Disk, so that it does not load a temporary profile

Do you have any progress at the moment?

Best Regards,

April 30th, 2015 8:01am

Hi Amy,

Unfortunately I have still not been able to find a solution to this issue.

I will continue investigating.

Eds

Free Windows Admin Tool Kit Click here and download it now
May 8th, 2015 8:44am

I have not made any progress. I create a much simpler task, which attempts to run a batch file and create a blank text file on my desktop.

When the task runs, i still see a message stating the server was unable to find my profile.

I can only assume that the task scheduler has not been updated to be aware of user profile disks, meaning it is unable to attach the disk and load my profile.

Very frustrating!

May 8th, 2015 12:23pm

Hi Eds,

At this point, I suggest you try to create a new user account, then log on with it to generate its user profile. After that change the scheduled task setting to run under the new user account to see whether it works.

If it does, then it is an issue regarding the former users profile. You may re-create the former users profile to resolve the issue.

Windows-User Profiles Service Event 1511: Windows cannot find the local profile and is logging you on with a temporary profile

http://social.technet.microsoft.com/wiki/contents/articles/3571.windows-user-profiles-service-event-1511-windows-cannot-find-the-local-profile-and-is-logging-you-on-with-a-temporary-profile.aspx

Best Regards

Free Windows Admin Tool Kit Click here and download it now
May 10th, 2015 10:44pm

Hi Eds,

At this point, I suggest you try to create a new user account, then log on with it to generate its user profile. After that change the scheduled task setting to run under the new user account to see whether it works.

If it does, then it is an issue regarding the former users profile. You may re-create the former users profile to resolve the issue.

Windows-User Profiles Service Event 1511: Windows cannot find the local profile and is logging you on with a temporary profile

http://social.technet.microsoft.com/wiki/contents/articles/3571.windows-user-profiles-service-event-1511-windows-cannot-find-the-local-profile-and-is-logging-you-on-with-a-temporary-profile.aspx

Best Regards,

May 11th, 2015 2:41am

I believe the problem being seen with user profile disks and scheduled tasks is because of a bug in Windows Server 2012:

https://support.microsoft.com/en-us/kb/2968540.

Since tasks scheduled to run while logged off will always use the Default user profile, it would be unable to mount any specific user profile disks, even if the task was set to run as a specific user.


  • Edited by SiBrit 8 hours 22 minutes ago
Free Windows Admin Tool Kit Click here and download it now
July 26th, 2015 6:40pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics