During the creation of a scheduled task using the task scheduler of Windows Server  2008 R2, I got the following error:

Error has occurred for task ‘TaskName’. Error message: User account restriction error. The possible reasons are that blank passwords not allowed, or that a policy restriction has been enforced.

and I couldn’t save the task….

Since you can choose a user to execute the task,  the problem was that the chosen user had a password too short, that violated system policies about password complexity.

I changed the password of the user and tried to save the task again using that user.

This time I was able to do that!