How to fix «The specified account is unknown, the password is incorrect, or the user account does not have permissions to create this task» for Task Scheduler in Windows 10?

2023-04-15--13-19-00

2023-04-15--13-27-30

A workaroung is to use the «Run only when user is logged in» option on the «General» tab:

2023-04-15--14-42-38

How did I fix it

Step 1

I renamed the PC from an automatic name «DESKTOP-GFK67RN» to «DMITRII-PC».

Step 2

I checked the new name using the whoami command:
2023-04-16--00-20-01

Step 3

I specified the whoami output («dmitrii-pc\dmitrii») as the user name, and my Microsoft account password, and it works!

2023-04-16--00-10-35