TheTaylorLee / AdminToolbox

Repository for the AdminToolbox PowerShell Modules
MIT License
185 stars 22 forks source link

modules/AdminToolbox.FileManagement/Public/Invoke-Robocopy.ps1 #142

Closed TheTaylorLee closed 8 months ago

TheTaylorLee commented 8 months ago

Discussed in https://github.com/TheTaylorLee/AdminToolbox/discussions/141

Originally posted by **TerryED0618** January 22, 2024 In your Crescendo module "modules/AdminToolbox.FileManagement/Public/Invoke-Robocopy.ps1" you have the -ExcludeFileName and -ExcludeDirName parameters defined as a Switch. As per https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy#file-selection-options they should be a space delimited list: 1. /xf [ ...] | Excludes files that match the specified names or paths. Wildcard characters (* and ?) are supported. 2. /xd [ ...] | Excludes directories that match the specified names and paths. I have found the /XD more than handy, as when mirroring my profile's OneDrive folder and excluding problematic folders: /XD "~\OneDrive\Apps" "~\OneDrive\Outlook Files" "~\OneDrive\Recordings"
TheTaylorLee commented 8 months ago

Note: Review other parameters & parameter sets for accuracy.

TheTaylorLee commented 8 months ago

The latest release should resolve this issue. Github actions are publishing the workflow now. Feel free to test it and provide any feedback if it doesn't work for you. @TerryED0618