Recently had an issue with my custom fileshare monitor but I believe it can happen to any Run As Account/Profile. My MP has a run as profile, to run the PowerShell commands:
When installing this at a customer, we have re-purposed an existing Run As Account, by changing the account credentials. The Account was then assigned to my Run As Profile.
However, the monitor wouldn’t work. Bummer! I had that tested extensively in my lab. And it is a simple monitor. So, I have added more debug to the script:
It will then show the logged on user while running the command.
For my (big surprise), the account running the monitoring was the account set before the re-purposing. And yes, it had been almost four days, so, not a case of waiting for the MPs to be updated in the agent.
So, quick solution: create a new Run As Account and assign it to the MP’s run as profile.
Moral of the story: you can’t always trust what it says in the run as account credentials configuration. There must an issue that needs to be looked at. Maybe by clearing the Health Store, it will download the correct information.
Hope this helps!