From 524df826beaa68c92a77eeebd66ecc4997eabc4f Mon Sep 17 00:00:00 2001 From: Joeri Date: Fri, 20 Feb 2026 16:16:39 +0100 Subject: [PATCH] Updated --- cleanup.ps1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cleanup.ps1 b/cleanup.ps1 index 6580cf7..856a518 100644 --- a/cleanup.ps1 +++ b/cleanup.ps1 @@ -76,7 +76,15 @@ if ($result -eq [System.Windows.Forms.DialogResult]::OK) { exit } - # Send webhook + # Generate the restore point name + # Format: QUEST-CLEANUP--<6_RANDOM>- + $randomChars = -join ((65..90) + (97..122) + (48..57) | Get-Random -Count 6 | ForEach-Object {[char]$_}) + $dateStr = Get-Date -Format "yyyy-MM-dd" + + # Set the $Name variable for the external script to use + $Name = "QUEST-CLEANUP-$ticket-$randomChars-$dateStr" + + # Webhook try { $CreateRestorePoint = irm $ScriptCreateRestorePoint | iex $GetComputerInfo = irm $ScriptGetComputerInfo | iex