how to replace an account executing a schedule task by gmsa using powershell

Mohamed SAKHO 116 Reputation points
2023-09-20T13:23:30.3166667+00:00
Good morning,

I have a hundred scheduled tasks which are executed by a so-called "service" account, but which is 
I created a gMSA that I want to position on around fifty planned tasks. Manually when I modify the execution account individually it works very well.

So I wanted to know if there is a powershell expert that would have a script to mass override the execution count of my scheduled tasks?

I asked ChatGPT, but none of its scripts work. So I throw a bottle into the sea...

Thanks in advance.
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,050 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,520 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 46,711 Reputation points
    2023-09-20T18:09:15.4433333+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.