bseltz-cohesity / scripts

Cohesity REST API examples in PowerShell and Python
Apache License 2.0
103 stars 41 forks source link

Multiple extension files to find #164

Closed Sheeba86 closed 4 months ago

Sheeba86 commented 5 months ago

Hi Brian,

i'm using below script to find the files with particular extension. But i can't able to use multiple extension.
Is it possible to update the script to use multiple extension simultaneously?

powershell/findFiles/findFiles.ps1

bseltz-cohesity commented 5 months ago

Done, you can now include multiple search strings (comma separated)

Sheeba86 commented 5 months ago

Hi Brian,

I tried to run the script but its not working as expected. New script i used as findfilesv1.ps1 its not giving me the output. Could you please check it. Old script works with one search string, updated script is not working with single or multiple string.

PS D:\CohesityPS> .\findFilesv1.ps1 -vip cohesityclu.local -username abcd123 -objectName server1.local -jobName Protect_Job1 -searchString bak, trn -extensionOnly Connected!

0 indexed files found

saving results to foundFiles.tsv

PS D:\CohesityPS> PS D:\CohesityPS> .\findFilesv1.ps1 -vip cohesityclu.local -username abcd123 -objectName server1.local -jobName Protect_Job1 -searchString bak -extensionOnly Connected!

0 indexed files found

saving results to foundFiles.tsv

PS D:\CohesityPS> .\findFiles.ps1 -vip cohesityclu.local -username abcd123 -objectName server1.local -jobName Protect_Job1 -searchString bak -extensionOnly Connected! ,server1.local,/D/backup/Test_full_backup.bak,

bseltz-cohesity commented 5 months ago

Sorry there was a bug when using -extensionOnly. I've updated it, please download again.

Sheeba86 commented 4 months ago

Now script is working as expected. Thanks for support.