Hi guys,
I am trying to create a bunch of saved searches across multiple projects, the script below will create the saved search but only in the datasource level search folders and not within the project, can anyone help
New-PWLogin
$searches = Import-Csv -Path "C:\Temp\savedsearch2.csv"
$getFoldersParms =@{FolderPath = "Projects\700000 - CMDP Test Project"}
Get-PWFolders $getFoldersParms -JustOne
foreach($Search in $Searches) {
Add-PWSavedSearch -searchfolder "Projects\700000 - CMDP Test Project\" -SearchName $search.Searchname -Attributes @{FI_ORIGIN_CODE = $search.Attributes; PWDM_STATUS = $search.Attributes2} -Environment $search.Environment -SearchSubFolders -ViewName "Document View" -ReplaceExisting -Verbose
}
Undo-PWLogin
Here is a snippet of my csv
...
You would need to include the OwnerProject parameter.
Thanks Brian, how would I do that?
I would suggest starting with the help.
Get-Help Add-PWSavedSearch -Full
You can replace the -SearchFolder with the -OwnerProject and provide the full path to the Work Area you want to associate the saved search with. Hope this helps.