This commit is contained in:
Joeri 2026-02-20 16:16:39 +01:00
parent 972ef5eeb7
commit 524df826be

View file

@ -76,7 +76,15 @@ if ($result -eq [System.Windows.Forms.DialogResult]::OK) {
exit
}
# Send webhook
# Generate the restore point name
# Format: QUEST-CLEANUP-<TICKET>-<6_RANDOM>-<yyyy-MM-dd>
$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