Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 0 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.