Set-FilesSync
Update Sync.
Syntax
Id (Default)
InputObject
Description
Update Sync.
The command accepts syncs from the pipeline as -InputObject, and uses each one's Id and the connection that fetched it.
When given -InputObject, the command updates that object with the values Files.com returns and writes it.
The command supports -WhatIf, which describes the change without sending it to Files.com, and -Confirm, which asks before sending it.
Examples
Example 1: Update Sync
Writes the sync as Files.com returns it.
Example 2: Act on syncs from the pipeline
Takes the sync from the pipeline and uses its Id and connection.
Example 3: Preview the change
Describes the change without sending anything to Files.com.
Parameters
-Id
Sync ID.
- Type:
System.Int64 - Parameter sets:
Id(required, position 0)
-DeleteEmptyFolders
Delete empty folders after sync?
- Type:
System.Boolean - Parameter sets:
Id,InputObject
-Description
Description for this sync job
- Type:
System.String - Parameter sets:
Id,InputObject
-DestPath
Absolute destination path for the sync
- Type:
System.String - Parameter sets:
Id,InputObject
-DestRemoteServerId
Remote server ID for the destination (if remote)
- Type:
System.Int64 - Parameter sets:
Id,InputObject
-Disabled
Is this sync disabled?
- Type:
System.Boolean - Parameter sets:
Id,InputObject
-ExcludePatterns
Array of glob patterns to exclude
- Type:
System.String[] - Parameter sets:
Id,InputObject
-HolidayRegion
Skip the sync if there is a formal, observed holiday for this region.
- Type:
System.String - Parameter sets:
Id,InputObject
-IncludePatterns
Array of glob patterns to include
- Type:
System.String[] - Parameter sets:
Id,InputObject
-Interval
If trigger is daily, this specifies how often to run this sync. One of: day, week, week_end, month, month_end, quarter, quarter_end, year, year_end
- Type:
System.String - Parameter sets:
Id,InputObject
-KeepAfterCopy
Keep files after copying?
- Type:
System.Boolean - Parameter sets:
Id,InputObject
-Name
Name for this sync job
- Type:
System.String - Parameter sets:
Id,InputObject
-RecurringDay
If trigger type is daily, this specifies a day number to run in one of the supported intervals: week, month, quarter, year.
- Type:
System.Int64 - Parameter sets:
Id,InputObject
-RecurringDays
If trigger type is daily, this specifies one or more day numbers to run in one of the supported intervals: week, month, quarter, year.
- Type:
System.Int64[] - Parameter sets:
Id,InputObject
-ScheduleId
If trigger is custom_schedule, the reusable Schedule used instead of the sync's schedule fields.
- Type:
System.Int64 - Parameter sets:
Id,InputObject
-ScheduleDaysOfWeek
If trigger is custom_schedule, Custom schedule description for when the sync should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
- Type:
System.Int64[] - Parameter sets:
Id,InputObject
-ScheduleTimeZone
Time zone for the schedule. If not set, times are interpreted as UTC.
- Type:
System.String - Parameter sets:
Id,InputObject
-ScheduleTimesOfDay
Times of day to run in HH:MM format. For custom_schedule, run at these times on specified days of week. For daily, run at these times on the scheduled interval date.
- Type:
System.String[] - Parameter sets:
Id,InputObject
-SrcPath
Absolute source path for the sync
- Type:
System.String - Parameter sets:
Id,InputObject
-SrcRemoteServerId
Remote server ID for the source (if remote)
- Type:
System.Int64 - Parameter sets:
Id,InputObject
-SyncIntervalMinutes
Frequency in minutes between syncs. If set, this value must be greater than or equal to the remote_sync_interval value for the site's plan. If left blank, the plan's remote_sync_interval will be used. This setting is only used if trigger is empty.
- Type:
System.Int64 - Parameter sets:
Id,InputObject
-Trigger
Trigger type: daily, custom_schedule, or manual
- Type:
System.String - Parameter sets:
Id,InputObject
-TriggerFile
Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
- Type:
System.String - Parameter sets:
Id,InputObject
-AlwaysWriteTriggerFile
If true, the trigger file will be sent at the end of a successful sync even when no files were transferred.
- Type:
System.Boolean - Parameter sets:
Id,InputObject
-InputObject
The sync to act on, such as one written by another command of the module, from the pipeline. The command uses its Id and the connection that fetched it.
- Type:
FilesCom.PowerShell.Models.Sync - Parameter sets:
InputObject(required)
-Connection
The connection to use, from Connect-FilesAccount. Defaults to the connection of the -InputObject or -Continuation given, and otherwise to the current runspace's default connection.
- Type:
FilesCom.PowerShell.FilesConnection - Parameter sets:
(All)
-WorkspaceScope
Runs this command's requests in this workspace, including workspace 0, instead of the connection's or, for an -InputObject, instead of the workspace the object was read in. The connection and the object are unchanged.
- Type:
System.Int64 - Parameter sets:
(All)
-NoWorkspaceScope
Runs this command's requests in no workspace, even if the connection has one. The connection itself is unchanged.
- Type:
System.Management.Automation.SwitchParameter - Parameter sets:
(All)
-Confirm
Prompts you for confirmation before running the cmdlet.
- Type:
System.Management.Automation.SwitchParameter - Confirm impact: Medium. At the default
$ConfirmPreferenceofHigh, the command runs without asking;-Confirmmakes it ask before each change.
-WhatIf
Shows what the cmdlet would change without sending anything to Files.com.
- Type:
System.Management.Automation.SwitchParameter
Common Parameters
This cmdlet supports the PowerShell common parameters, such as -Verbose and -ErrorAction.
Inputs
FilesCom.PowerShell.Models.Sync: a sync from another command of the module, as-InputObject.
Outputs
FilesCom.PowerShell.Models.Sync: the sync as Files.com returned it.
Notes
Failures are written as error records with IDs such as Files.NotFound or Files.Authentication. Run Get-Help about_FilesCom for connections, paging, errors and previewing changes.