SOLVED
Home

Synd-MailPublicFolderSync Powershell script

Jesper Stein
Contributor

My company are running a hybrid Exchange 2010/Office 365 solution. We are syncronizing the public folders to Office 365 with the supported script Sync-MailPublicFolders.ps1.

 

I have to run this manually to supply credentials and answer yes to a few questions while executing.

Has anyone an idea or done it, how to run this as an Schedueld Task?

1 Reply
Solution

The scipts accepts a Credential object as parameter, or you can simply edit it to get the credentials from a secure location (credentials manager or an encrypted file). There are multiple examples on how to achieve this for PowerShell scripts on the internet, do a search. Or you can just hardcode the username/password, though I would not recommended this approach even if the machine on which you will run the script is tightly locked.

 

Then you simply invoke it as a scheduled task, again multiple examples on the internet. Here's the first example I got: https://community.spiceworks.com/how_to/17736-run-powershell-scripts-from-task-scheduler

Related Conversations