Updated
This commit is contained in:
parent
972ef5eeb7
commit
524df826be
1 changed files with 9 additions and 1 deletions
10
cleanup.ps1
10
cleanup.ps1
|
|
@ -76,7 +76,15 @@ if ($result -eq [System.Windows.Forms.DialogResult]::OK) {
|
||||||
exit
|
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 {
|
try {
|
||||||
$CreateRestorePoint = irm $ScriptCreateRestorePoint | iex
|
$CreateRestorePoint = irm $ScriptCreateRestorePoint | iex
|
||||||
$GetComputerInfo = irm $ScriptGetComputerInfo | iex
|
$GetComputerInfo = irm $ScriptGetComputerInfo | iex
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue