QA Integration Team test
- Implement a script that synchronizes two folders: source and replica.
- The script should maintain a full, identical copy of source folder at replica folder.
- The task should be done only using native PowerShell cmdlets.
- Synchronization must be one-way: after the synchronization content of the replica folder should be modified to exactly match content of the source folder.
- File creation/copying/removal operations should be logged to a file and to the console output.
- Folder paths and log file path should be provided using the command line arguments.
- Do not use robocopy and similar utilities.
Sync-Directory [-Source] <String> [-Destination] <String> [[-LogFilePath] <String>] [-IncludeLogTime] [-Force] [-WhatIf] [-Confirm] [CommonParameters]Sync-Directory -Source c:\source -Destination c:\destination -LogFilePath c:\log.txt- Subfolders won't be deleted from destination folders, only its contents.
SourceandDestinationparameters won't work withrelative paths.