I am developing a powershell based managment pack to monitor cloud resources and I need authentication in place.

Have anyone used basic runAsAccount in a PS discovery or script? I have played around a little but I get this error event 1102

I have created a run as profile

And added parameters to my script datasource

Before using them as parameters in my script

HELP! my basic management pack gives me headaches


EDIT: Full class/discovery and script

Discovery script

Ehrnst selected answer