< Back

New-AMFileSystemCondition

Sat Jan 11, 2020 2:55 am

NAME New-AMFileSystemCondition



SYNOPSIS

Creates a new AutoMate Enterprise file system condition.





SYNTAX

New-AMFileSystemCondition [-Name] <String> [-MonitorFolder] <String> [-Subfolders] [-WaitForAccess]

[-UsePollingMode] [-FileAdded] [-FileRemoved] [-FileRenamed] [-FileModified] [-FolderAdded] [-FolderRemoved]

[-FolderRenamed] [-FolderModified] [-FileCount <Int32>] [-FolderCount <Int32>] [-FileSize <Int32>] [-FolderSize

<Int32>] [-Include <String>] [-Exclude <String>] [-UserMode {NoUser | DefaultUser | SpecifiedUser}] [-UserName

<String>] [-Domain <String>] [-Wait] [-Timeout <Int32>] [-TimeoutUnit {Seconds | Minutes | Hours | Days |

Milliseconds}] [-TriggerAfter <Int32>] [-IgnoreExistingCondition] [-Notes <String>] [-Folder <Object>]

[-Connection <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

New-AMFileSystemCondition creates a new file system condition.





PARAMETERS

-Name <String>

The name of the new object.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-MonitorFolder <String>

The folder to monitor.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Subfolders [<SwitchParameter>]

Subfolders will be monitored in addition to the parent folder.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-WaitForAccess [<SwitchParameter>]

No action is taken until a file is no longer in use and fully accessible.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-UsePollingMode [<SwitchParameter>]

Use polling mode with a 5 second interval.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-FileAdded [<SwitchParameter>]

Monitor for files added to the folder.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-FileRemoved [<SwitchParameter>]

Monitor for files removed from the folder.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-FileRenamed [<SwitchParameter>]

Monitor for files renamed in the folder.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-FileModified [<SwitchParameter>]

Monitor for files modified in the folder.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-FolderAdded [<SwitchParameter>]

Monitor for folders added to the folder.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-FolderRemoved [<SwitchParameter>]

Monitor for folders removed from the folder.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-FolderRenamed [<SwitchParameter>]

Monitor for folders renamed in the folder.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-FolderModified [<SwitchParameter>]

Monitor for folders modified in the folder.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-FileCount <Int32>

No action is taken until the number of files specified is met.



Required? false

Position? named

Default value -1

Accept pipeline input? false

Accept wildcard characters? false



-FolderCount <Int32>

No action is taken until the number of folders specified is met.



Required? false

Position? named

Default value -1

Accept pipeline input? false

Accept wildcard characters? false



-FileSize <Int32>

No action is taken until the size of files specified is met.



Required? false

Position? named

Default value -1

Accept pipeline input? false

Accept wildcard characters? false



-FolderSize <Int32>

No action is taken until the size of folders specified is met.



Required? false

Position? named

Default value -1

Accept pipeline input? false

Accept wildcard characters? false



-Include <String>

Specifies the filter(s) to be included in the search.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Exclude <String>

Specifies the filter(s) to be excluded from the search.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-UserMode

Specify to use the default agent user (DefaultUser) or a specified user (SpecifiedUser).



Required? false

Position? named

Default value NoUser

Accept pipeline input? false

Accept wildcard characters? false



-UserName <String>

The username used to authenticate with the database.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Domain <String>

The domain for the specified user.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Wait [<SwitchParameter>]

Wait for the condition, or evaluate immediately.



Required? false

Position? named

Default value True

Accept pipeline input? false

Accept wildcard characters? false



-Timeout <Int32>

If wait is specified, the amount of time before the condition times out.



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-TimeoutUnit

The unit for Timeout (Seconds by default).



Required? false

Position? named

Default value Seconds

Accept pipeline input? false

Accept wildcard characters? false



-TriggerAfter <Int32>

The number of times the condition should occur before the trigger fires.



Required? false

Position? named

Default value 1

Accept pipeline input? false

Accept wildcard characters? false



-IgnoreExistingCondition [<SwitchParameter>]

Don't trigger on startup if condition is true.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Notes <String>

The new notes to set on the object.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Folder <Object>

The folder to place the object in.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Connection <Object>

The server to create the object on.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>New-AMFileSystemCondition -Name "Monitor folder C:\\temp" -MonitorFolder "C:\\temp" -FileAdded















RELATED LINKS

https://github.com/AutomatePS/AutomatePS