-
Notifications
You must be signed in to change notification settings - Fork 19
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
Update-NexposeScanEnginePool: 4 misc fixes #28
Comments
My unit test for NEWNAME
Output: |
My unit test for SCANENGINE
Output Changed ID 7 from 11 engines to 10 |
My unit test for SITE
Output |
You can see from the output that changing the name works, as well as adding an engine (and replacing back with the original list) However, adding a site does not seem to work. I've thrown on -debug and the updated list appears to be passed correctly to Invoke-NexposeRestMethod. I'm interested to know if it works for you, or if you can find what I've missed. as always, thanks! |
Thank you again for these bug reports, I really appreciate it. I can't test the scan engine code very well as I am using the 30-day trial licence that only allows the single built-in scan engine, however the code fixes you posted are correct. |
Did you get a chance to test updating the sites? |
Ah sorry, missed that bit. |
Can you send me the ApiQuery data shown with the |
Add an engine (this works)
|
Add a site (this doesn't work)
|
I'm just writing some code to test directly against the API and confirm functionality, and will post that when complete |
Thank you very much for that, it does look like the ApiQuery is valid for the call. |
While (re)testing more of this function, I discovered a few bugs:
line 54
If ([string]::IsNullOrEmpty($NewName) -and [string]::IsNullOrEmpty($ScanEngine)) {
is missing checking for sites. I'm not sure if this is intentional
If ([string]::IsNullOrEmpty($NewName) -and [string]::IsNullOrEmpty($ScanEngine) -and [string]::IsNullOrEmpty($Site)) {
line 67
ForEach ($seId In $ScanEngineIds) {
should be
ForEach ($seId In $ScanEngine) {
line 83
ForEach ($sId In $SiteIds) {
should be
ForEach ($sId In $Site) {
line 85
$ScanEngineIds += $sId
should be
$SiteIds += $sId
The text was updated successfully, but these errors were encountered: