Deploying via Group Policy - sjwaterco/FileSyncScript GitHub Wiki
It is easy to deploy FileSync.ps1 as a Scheduled Task using the following instructions:
- Open the Group Policy Management editor
- Navigate to Computer Configuration > Preferences > Control Panel Preferences > Scheduled Tasks
- Create a new Scheduled Task with the following properties:
- General tab
- Action: Update
- Name: Synchronize Files (or whatever you want)
- Run as: NT AUTHORITY\SYSTEM
- Run only when user is logged on
- Triggers tab
- Create your trigger criteria here
- Actions
- Start a program
- Program/script: powershell.exe
- Add arguments: -NonInteractive -File "\\path\to\FileSync.ps1" "\\path\to\config.xml"
- Start a program
- General tab
- Deploy the GPO to a collection of computers. If you want to only sync to laptops or tablets, use a WMI filter.