1. Home
  2. Docs
  3. Super-ExMerge On-line Doc...
  4. PowerShell Cmdlet Referen...
  5. New-AllowedFolderActions

New-AllowedFolderActions

Use this cmdlet to create a new AllowedFolderActions object that describes the synchronization actions on folders that are allowed to occur.

New-AllowedFolderActions

    • [-AllowSourceCreate]
    • [-AllowTargetCreate]
    • [-AllowSourceDelete]
    • [-AllowTargetDelete]
    • [-AllowSourceModify]
    • [-AllowTargetModify]
    • [-RestoreSourceFolderIfDeleted]
    • [-RestoreTargetFolderIfDeleted]
    • [-FolderPropertyPreference]

    Description

    The New-AllowedFolderActions cmdlet creates a AllowedFolderActions object that can be used to control the behavior of the synchronization of folders. This object is used in the New-SyncTask and Set-SyncTask cmdlets.

    An instance of AllowedFolderActions controls whether a folder can be created, deleted, or modified during a sync session. If this cmdlet is call with no parameters, then all actions are denied and no folders will synchronize in the task. When using this cmdlet, any parameter not used subsequently denies that action from occurring, while the existence of the parameter allow the action. The allowed actions provided by this object apply to all folders in the sync task, except those that have specific folder action settings. See the Add-FolderSpecificAllowedActions cmdlet for detail on setting folder specific rights.

    Through the use of these permissions, a sync task can be set as a one-way sync, two-way sync, or a mixture of values.

    Examples

    Example 1
      New-AllowedFolderActions
    

    This example will create a new AllowedFolderActions object with all actions denied. Generally this is a worthless outcome since no folders would sync, and is shown here for completeness.

    Example 2
      New-AllowedFolderActions -AllowTargetCreate -AllowTargetModify -AllowTargetDelete -FolderPropertyPreference Source
    

    This example creates a one-way sync, from source to target. This is achieved by only allowing create, delete, and modification actions to the target store.

    Example 3
      New-AllowedFolderActions -AllowTargetCreate -AllowTargetModify -RestoreTargetIfDeleted
    

    This example will allow target folders to be created and modified, and if a target folder is found to have been deleted it will be recreated from the source folder.


    Parameters

    -AllowSourceCreate

    The AllowSourceCreate parameter determines whether a source folder can be created during a sync session. If this parameter is not used or set to false, folder creation is prevented.

    The sync engine will use this permission when a target folder is found to be new, meaning that the target folder has never been synchronized before, and as a result will attempt to create the same folder in the source store.

    Required:
    No
    Type:
    Aliases:
    Position:
    Not a positioned parameter. Use by name only.
    Default Value:
    False

    -AllowTargetCreate

    The AllowTargetCreate parameter determines whether a target folder can be created during a sync session. If this parameter is not used or set to false, folder creation is prevented.
    The sync engine will use this permission when a source folder is found to be new, meaning that the source folder has never been synchronized before, and as a result will attempt to create the same folder in the target store.

    Required:
    No
    Type:
    SwitchParameter
    Aliases:
    atc
    Position:
    Not a positioned parameter. Use by name only.
    Default Value:
    False

    -AllowSourceDelete

    The AllowSourceDelete parameter determines whether a source folder can be deleted during a sync session. If this parameter is not used or set to false, folder deletion is prevented.
    The sync engine will use this permission when a target folder is found to have been deleted since the last sync session and as a result will attempt to delete the same folder in the source store.

    Required:
    No
    Type:
    SwitchParameter
    Aliases:
    asd
    Position:
    Not a positioned parameter. Use by name only.
    Default Value:
    False

    -AllowTargetDelete

    The AllowTargetDelete parameter determines whether a target folder can be deleted during a sync session. If this parameter is not used or set to false, folder deletion is prevented.
    The sync engine will use this permission when a source folder is found to have been deleted since the last sync session and as a result will attempt to delete the same folder in the target store.

    Required:
    No
    Type:
    SwitchParameter
    Aliases:
    atd
    Position:
    Not a positioned parameter. Use by name only.
    Default Value:
    False

    -AllowSourceModify

    The AllowSourceModify parameter determines whether a source folder can be modified during a sync session. If this parameter is not used or set to false, folder modification is prevented.
    The sync engine will use this permission when a target folder is found to have been modified since the last sync session and as a result will attempt to modify the same folder in the source store.

    Required:
    No
    Type:
    SwitchParameter
    Aliases:
    asm
    Position:
    Not a positioned parameter. Use by name only.
    Default Value:
    False

    -AllowTargetModify

    The AllowTargetModify parameter determines whether a target folder can be modified during a sync session. If this parameter is not used or set to false, folder modification is prevented.
    The sync engine will use this permission when a source folder is found to have been modified since the last sync session and as a result will attempt to modify the same folder in the target store.

    Required:
    No
    Type:
    SwitchParameter
    Aliases:
    atm
    Position:
    Not a positioned parameter. Use by name only.
    Default Value:
    False

    -RestoreSourceFolderIfDeleted

    The RestoreSourceFolderIfDeleted parameter determines whether a source folder is recreated if it is found to have been deleted after a previous sync session. The folder is only recreated if the related target folder also still exists. If the folder has been deleted in both the source and target stores, no action is taken.

    Required:
    No
    Type:
    SwitchParameter
    Aliases:
    rsf
    Position:
    Not a positioned parameter. Use by name only.
    Default Value:
    False

    -RestoreTargetFolderIfDeleted

    The RestoreTargetFolderIfDeleted parameter determines whether a target folder is recreated if it is found to have been deleted after a previous sync session. The folder is only recreated if the related source folder also still exists. If the folder has been deleted in both the source and target stores, no action is taken.

    Required:
    No
    Type:
    SwitchParameter
    Aliases:
    rtf
    Position:
    Not a positioned parameter. Use by name only.
    Default Value:
    False

    -FolderPropertyPreference

    The FolderPropertyPreference applies to folder modification actions only. When a folder has been modified since the last sync, this value determines the direction of sync.

    The possible values for this parameter are: LastModified, Source, and Target.

    The LastModified value is the default value if this parameter is not used.
    The LastModified value means that the folder that is more recently modified between the source and target is used as the source of change.

    The Source value means that changes are copied from the source folder to the target folder.

    The Target value means that changes are copied from the target folder to the source folder.

    Required:
    No
    Type:
    EnvironmentPrefernce (Enum)
    Aliases:
    fpp
    Position:
    Not a positioned parameter. Use by name only.
    Default Value:
    LastModified

    Output

    This cmdlet will place a AllowedFolderActions object on the pipeline.

    How can we help?