I’ve tried a zillion things in the Actions panel and I still get an opcode of 2, supposedly meaning the file can’t be found…AND no events ever get written into the log like they are supposed to be. This is for a scheduled task running ON the Exchange 2010 server.
Scripts permission is RemoteSigned, the script works with all these parameters etc. if I manually run it from a batch file.
I’ve double-checked the presence of each file involved.
This is an Exchange 2010 on Windows Server 2008 R2, all current patches.
It’s being run with the Administrator login (domain admin account, highest privileges, run logged in or not).
The task runs but it doesn’t do what it’s supposed to do, put things into the event log.
Thank you, Tom
That being the case, it’s honestly hard to say without being able to sit in front of it and explore. Have you tried running a very simple script, that perhaps doesn’t use Exchange at all, just to see if you can get ANYTHING to run as a Task?
I’ll try using another simple Exchange script…
I had similar problems with a login monitoring script…and gave up.
But now I really need to figure out doing something like this.
Thank you, Tom
Does the host where the script resides have the same EMS as the Exchange servers? Some commands won’t run even if you include a ‘load snapin’ command : Add-PSSnapin Microsoft.Exchange.Management.Powershell.E2010
Been caught out with this before!
The scheduled task IS running ON the Exchange 2010 server. As administrator.
I have not had opportunity to work on this b/c of putting out fires…
Thank you, Tom
Have you tried removing ’ -Server e10 -PercentEdbFreeSpaceThreshold 10 -PercentLogFreeSpaceThreshold 10’ and seeing if it works? Maybe just add a read-host at the end of your script to see what its doing?
One is required to put the -server parameter so the script knows which server to work on.
I think I tried removing the other params.
It will be a couple weeks before I can get back to this.
Thank you, Tom