Infocyte / PowershellTools

Useful Powershell Tools for operating or testing Infocyte HUNT
Apache License 2.0
16 stars 11 forks source link

Remove-ICAgent fails to trigger uninstall #23

Closed smaresca closed 3 years ago

smaresca commented 3 years ago

Remove-ICAgent does not currently result in a successful agent uninstallation.

PR to come momentarily.

Example current output:

Remove-ICAgent -Id e6871d85-819c-4dce-abda-deadbeefa2e5 Invoke-RestMethod : The remote server returned an error: (404) Not Found. At C:\Program Files\WindowsPowerShell\Modules\InfocyteHUNTAPI\1.6.7\requestHelpers.ps1:233 char:5

  • Invoke-RestMethod -Uri $url -headers $headers -body $json -Method ...
  • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
  • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

True

singlethreaded commented 3 years ago

Thanks for finding that. Accepted the change and will sign a new module on the PSGallery some time later today.