diff --git a/cleanup.ps1 b/cleanup.ps1 index e4dc316..1fa30cb 100644 --- a/cleanup.ps1 +++ b/cleanup.ps1 @@ -64,24 +64,13 @@ if ($result -eq [System.Windows.Forms.DialogResult]::OK) { exit } - # === RUN REMOTE SCRIPT ================================================== - Write-Host "Fetching data from remote script..." - try { - $remoteData = (Invoke-WebRequest -Uri $RemoteScriptURL -Method Get).Content - Write-Host "Remote data received:`n$($remoteData | ConvertTo-Json -Compress)" - } - catch { - Write-Error "Failed to fetch remote script: $_" - exit - } - # === SEND TO WEBHOOK ==================================================== try { $computerInfo = Get-ComputerInfo | ConvertTo-Json -Compress $payload = @{ ticket = $ticket - computerInfo = $computerInfo + computerInfo = $computerInfo | ConvertFrom-Json } | ConvertTo-Json -Compress $response = Invoke-RestMethod -Uri $WebhookURL -Method Post `