New-FilesSync
Create Sync.
Syntax
Description
Create Sync.
The command supports -WhatIf, which describes the change without sending it to Files.com, and -Confirm, which asks before sending it.
Examples
Example 1: Create Sync
Writes the sync returned.
Example 2: Preview the change
Describes the change without sending anything to Files.com.
Parameters
-DeleteEmptyFolders
Delete empty folders after sync?
- Type:
System.Boolean - Parameter sets:
(All)
-Description
Description for this sync job
- Type:
System.String - Parameter sets:
(All)
-DestPath
Absolute destination path for the sync
- Type:
System.String - Parameter sets:
(All)
-DestRemoteServerId
Remote server ID for the destination (if remote)
- Type:
System.Int64 - Parameter sets:
(All)
-Disabled
Is this sync disabled?
- Type:
System.Boolean - Parameter sets:
(All)
-ExcludePatterns
Array of glob patterns to exclude
- Type:
System.String[] - Parameter sets:
(All)
-HolidayRegion
Skip the sync if there is a formal, observed holiday for this region.
- Type:
System.String - Parameter sets:
(All)
-IncludePatterns
Array of glob patterns to include
- Type:
System.String[] - Parameter sets:
(All)
-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:
(All)
-KeepAfterCopy
Keep files after copying?
- Type:
System.Boolean - Parameter sets:
(All)
-Name
Name for this sync job
- Type:
System.String - Parameter sets:
(All)
-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:
(All)
-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:
(All)
-ScheduleId
If trigger is custom_schedule, the reusable Schedule used instead of the sync's schedule fields.
- Type:
System.Int64 - Parameter sets:
(All)
-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:
(All)
-ScheduleTimeZone
Time zone for the schedule. If not set, times are interpreted as UTC.
- Type:
System.String - Parameter sets:
(All)
-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:
(All)
-SrcPath
Absolute source path for the sync
- Type:
System.String - Parameter sets:
(All)
-SrcRemoteServerId
Remote server ID for the source (if remote)
- Type:
System.Int64 - Parameter sets:
(All)
-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:
(All)
-Trigger
Trigger type: daily, custom_schedule, or manual
- Type:
System.String - Parameter sets:
(All)
-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:
(All)
-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:
(All)
-WorkspaceId
Workspace ID this sync belongs to
- Type:
System.Int64 - Parameter sets:
(All)
-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
None. The command takes no pipeline input.
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.