Test-1.exclude.file.ps1 shows that the parameter Exclude works for the file, at least in v5.1.
In v2 Exclude ignores the specified value and removes the file.
Test-2.exclude.directory.ps1 shows that the parameter Exclude ignores the directory.
Test-1.exclude.file.ps1 shows that the parameter Exclude works for the file, at least in v5.1.
In v2 Exclude ignores the specified value and removes the file.
Test-2.exclude.directory.ps1 shows that the parameter Exclude ignores the directory.