Hello
Thank you for your question and reaching out. I can understand you are having query related to PowerShell using Task scheduler.
You can use gMSA accounts achieve this goal , in which password will be not saved in that Server or Credentials Manager , rater it will be get from AD.
-----------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept as answer--