I am trying to run a script with the Task Scheduler.
It works just fine when the user is logged in, but when I try to run it when the user is not logged in, the command Get-SCVirtualMachine
returns null.
The script does run, but just that command doesnt return any value when I am running it without the service account being logged in.
Of course I have the "Run wether user is logged on or not" flag set to true. And as I said, the script gets executed, just that SCVMM cmdlet isn't working.