Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Start-SearchJob with how the progress bar is calculated #30

Open
ryan-niemes-helix opened this issue Aug 11, 2021 · 2 comments

Comments

@ryan-niemes-helix
Copy link

Not sure what's causing this, but this keeps showing up. Search appears to work just fine.

I think I'd like a way to kill off the 'progress bar' because I'm wanting to run this in a script.

here's what I'm running currently:

$startdate = Get-Date -Year 2021 -Month 07 -Day 11 -Hour 00 -Minute 00 -Second 00
$enddate = Get-Date -Year 2021 -Month 07 -Day 11 -Hour 00 -Minute 15 -Second 00

Start-SearchJob -Query "_collector=""""" -From $startdate -To $enddate | Get-SearchResult -Type Message | Out-File -FilePath "./result.txt"

Line |
102 | … $title -Status $text -PercentComplete ($processedMs / $totalMs * 100)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot validate argument on parameter 'PercentComplete'. The -1500 argument is less than the minimum allowed range of -1. Supply an argument that is greater
| than or equal to -1 and then try the command again.

@frankreno
Copy link

@ryan-niemes-helix - thank you for reporting this. This repo is maintained as a community repo and we do our best to maintain it. We will have a look at this as we can but cannot make any guarantee on when it will be addressed. We would of course welcome and review any PR submitted.

@ryan-niemes-helix
Copy link
Author

Ok sounds good thanks @frankreno. I am definitely not a powershell expert but maybe I can come up with something that I'll submit. This is my first powershell script so we'll see how it goes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants