0

I have an Exchange script that I want to schedule to run once a month. In our environment we have a server which runs all scripts and scheduled tasks, so for policy reasons I need to run this script remotely from here rather than on the Exchange server itself.

I can set up a scheduled task to run as a user with the correct Exchange roles assigned. How can I get my script to connect to Exchange implicitly using this account, without explicitly specifying credentials? I don't want to save the password in plain text (or the username for that matter).

Is this possible?

Matt
  • 1,893
  • 5
  • 28
  • 40

1 Answers1

0

This now works (through trial and error). The following resolved my issue:

  1. In Task Scheduler, tick the box for 'run iwth highest privileges'
  2. DO NOT USE https in your connectionURI (doing so causes access denied once you do 1.)

Don't know if this will work for anyone else, but it worked for me. Once I've verified I'll generalise my script and post it here.

Matt
  • 1,893
  • 5
  • 28
  • 40