Creating multiple saved searches

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 Slight smile


$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



Here is a snippet of my csv


Parents Reply Children