I am getting an error when using the -FromRoot switch in the Copy-PWSavedSearch2 module. In this example I am trying to copy a datasource level global search to a datasource level personal search, even tried to copy from the datasource level to another work area path, but I still get the same error.
Copy-PWSavedSearch2 : Parameter set cannot be resolved using the specified named parameters.At line:1 char:1+ Copy-PWSavedSearch2 -FromGlobalSearch 'searchName' -FromRoot -ToDatas ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Copy-PWSavedSearch2], ParameterBindingException + FullyQualifiedErrorId : AmbiguousParameterSet,PWPS_DAB.CopyPWSavedSearch2
new-pwlogin Copy-PWSavedSearch2 -FromGlobalSearch 'searchName' -FromRoot -ToDatasourceLevel -ToPersonalSearch -Verbose undo-pwlogin Copy-PWSavedSearch2 : Parameter set cannot be resolved using the specified named parameters. At line:1 char:1 + Copy-PWSavedSearch2 -FromGlobalSearch 'searchName' -FromRoot -ToDatas ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Copy-PWSavedSearch2], ParameterBindingException + FullyQualifiedErrorId : AmbiguousParameterSet,PWPS_DAB.CopyPWSavedSearch2
Looks like they have a bug in the parameter definitions and either -FromWorkAreaPath or -FromWorkAreaFolderId is required, even though -FromRoot should replace either of those.
I cant try myself at the moment but might try adding -FromWorkAreaFolderId 0
but I suspect that won't work.
Hi Kevin. Thank you for replying, I tried -FromWorkAreaFolderId 0 but unfortunately it did not work. Hopefully it gets fixed in a future release. Kind regards Gavin
This is fixed in today's release of PWPS_DAB. And the switch has been renamed to FromDatasourceLevel. Thank you for bringing the issue to our attention.
Mark Weisman | Bentley Systems.
Answer Verified By: Gavin Chapman