Hi,
Start-SCOMTask does not require the usage of PSCredential when started by non-admin users and when the option "Task Execution" is Disabled. In this case (when -TaskCrendetials). This would result in the task failing in case the non-admin user has not been delegated the permission on the task in question.
In order to better understand your gooal I have to ask some additional questions:
- If I get this right, you want to start a Task, using the option "Use predefined Run As Accont" over PowerShell (Start-SCOMTask), is that correct?
- Do you want to do this with your admin account or in another user context?
- Is the other user (if this iss in question) an admin or a scoped user?
- What about this example (from the cmdlet reference for SCOM 2022):
Get-SCOMTask -DisplayName "Get Monitor State" | Start-SCOMTask -Instance $Instances
with the option "Task Execution" (Reference) being disabled?
Can you please post those detials, I will do my best to help you.
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Stoyan Chalakov