Custom powershell script MSSQL

I think I’ve just found the reason… The system account doesn’t seem to have sufficient rights in MSSQL after all, even though it did look like it. I just changed the CheckMK service to run under my user and i now see output with cmk -d [hostname]
It seems that when I use:
“C:\Program Files (x86)\checkmk\service\check_mk_agent.exe” test
It runs under my user and not the user the service for the agent runs on.