Set-FilesAutomation
Update Automation.
Syntax
Id (Default)
InputObject
Description
Update Automation.
The command accepts automations 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 Automation
Writes the automation as Files.com returns it.
Example 2: Act on automations from the pipeline
Takes the automation 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
Automation ID.
- Type:
System.Int64 - Parameter sets:
Id(required, position 0)
-Source
Source path/glob. See Automation docs for exact description, but this is used to filter for files in the path to find files to operate on. Supports globs, except on remote mounts.
- Type:
System.String - Parameter sets:
Id,InputObject
-Destinations
A list of destination paths. Use a trailing slash for folder destinations and omit it for file destinations.
- Type:
System.String[] - Parameter sets:
Id,InputObject
-DestinationReplaceFrom
If set, this string in the destination path will be replaced with the value in destination_replace_to.
- Type:
System.String - Parameter sets:
Id,InputObject
-DestinationReplaceTo
If set, this string will replace the value destination_replace_from in the destination filename. You can use special patterns here.
- Type:
System.String - Parameter sets:
Id,InputObject
-Interval
How often to run this automation? One of: day, week, week_end, month, month_end, quarter, quarter_end, year, year_end
- Type:
System.String - Parameter sets:
Id,InputObject
-Path
Path on which this Automation runs. Supports globs, except on remote mounts.
- Type:
System.String - Parameter sets:
Id,InputObject
-SyncIds
A list of sync IDs the automation is associated with. If sent as a string, it should be comma-delimited. Give the values as an array; the module joins them as the API expects.
- Type:
System.Int64[] - Parameter sets:
Id,InputObject
-UserIds
A list of user IDs the automation is associated with. If sent as a string, it should be comma-delimited. Give the values as an array; the module joins them as the API expects.
- Type:
System.Int64[] - Parameter sets:
Id,InputObject
-GroupIds
A list of group IDs the automation is associated with. If sent as a string, it should be comma-delimited. Give the values as an array; the module joins them as the API expects.
- Type:
System.Int64[] - Parameter sets:
Id,InputObject
-ScheduleId
If trigger is custom_schedule, the reusable Schedule used instead of the automation's schedule fields.
- Type:
System.Int64 - Parameter sets:
Id,InputObject
-ScheduleDaysOfWeek
If trigger is custom_schedule without schedule_id, a list of days of the week to run this automation. 0 is Sunday, 1 is Monday, etc.
- Type:
System.Int64[] - Parameter sets:
Id,InputObject
-ScheduleTimesOfDay
Times of day to run in HH:MM format (24-hour). Required for custom_schedule without schedule_id. Optional for daily triggers; if not set, runs at midnight UTC.
- Type:
System.String[] - Parameter sets:
Id,InputObject
-ScheduleTimeZone
Time zone for schedule fields. Optional for custom_schedule without schedule_id and for daily. If not set, times are interpreted as UTC.
- Type:
System.String - Parameter sets:
Id,InputObject
-HolidayRegion
Skip automation on holidays in this region. Optional for custom_schedule without schedule_id and for daily.
- Type:
System.String - Parameter sets:
Id,InputObject
-AlwaysOverwriteSizeMatchingFiles
Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is true we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless overwrite_files is also set to true.
- Type:
System.Boolean - Parameter sets:
Id,InputObject
-AlwaysSerializeJobs
Ordinarily, we will allow automation runs to run in parallel for non-scheduled automations. If this flag is true we will force automation runs to be serialized (run one at a time, one after another). This can resolve some issues with race conditions on remote systems at the cost of some performance.
- Type:
System.Boolean - Parameter sets:
Id,InputObject
-Description
Description for the this Automation.
- Type:
System.String - Parameter sets:
Id,InputObject
-Definition
Automation v2 graph definition. Give a hashtable or PSCustomObject; keys keep their case and values their types.
- Type:
System.Collections.IDictionary - Parameter sets:
Id,InputObject
-Disabled
If true, this automation will not run.
- Type:
System.Boolean - Parameter sets:
Id,InputObject
-ExcludePattern
If set, this glob pattern will exclude files from the automation. Supports globs, except on remote mounts.
- Type:
System.String - Parameter sets:
Id,InputObject
-ImportUrls
List of URLs to be imported and names to be used.
- Type:
System.Collections.IDictionary[] - Parameter sets:
Id,InputObject
-FlattenDestinationStructure
Normally copy and move automations that use globs will implicitly preserve the source folder structure in the destination. If this flag is true, the source folder structure will be flattened in the destination. This is useful for copying or moving files from multiple folders into a single destination folder.
- Type:
System.Boolean - Parameter sets:
Id,InputObject
-IgnoreLockedFolders
If true, the Lock Folders behavior will be disregarded for automated actions.
- Type:
System.Boolean - Parameter sets:
Id,InputObject
-LegacyFolderMatching
DEPRECATED: If true, use the legacy behavior for this automation, where it can operate on folders in addition to just files. This behavior no longer works and should not be used.
- Type:
System.Boolean - Parameter sets:
Id,InputObject
-Name
Name for this automation.
- Type:
System.String - Parameter sets:
Id,InputObject
-OverwriteFiles
If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten on Copy automations if they appear to be the same file size as the newly incoming file. Use the always_overwrite_size_matching_files option in conjunction with overwrite_files to override this behavior and overwrite files no matter what.
- Type:
System.Boolean - Parameter sets:
Id,InputObject
-PathTimeZone
Timezone to use when rendering timestamps in paths.
- Type:
System.String - Parameter sets:
Id,InputObject
-RetryOnFailureIntervalInMinutes
If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
- Type:
System.Int64 - Parameter sets:
Id,InputObject
-RetryOnFailureNumberOfAttempts
If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
- Type:
System.Int64 - Parameter sets:
Id,InputObject
-Trigger
How this automation is triggered to run.
- Type:
System.String - Parameter sets:
Id,InputObject
-TriggerActions
If trigger is action, this is the list of action types on which to trigger the automation. Valid actions are create, copy, move, archived_delete, update, read, destroy
- Type:
System.String[] - Parameter sets:
Id,InputObject
-Value
A Hash of attributes specific to the automation type. Give a hashtable or PSCustomObject; keys keep their case and values their types.
- Type:
System.Collections.IDictionary - 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
-Automation
Automation type
- Type:
System.String - Parameter sets:
Id,InputObject
-InputObject
The automation 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.Automation - 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.Automation: a automation from another command of the module, as-InputObject.
Outputs
FilesCom.PowerShell.Models.Automation: the automation 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.