Update Scriptmonkey_Beta.ps1
This commit is contained in:
@@ -337,23 +337,6 @@ $ConfirmPreference = 'None'
|
||||
}
|
||||
}
|
||||
|
||||
function Remove-SVSDeploymentRegKey {
|
||||
$regKey = 'HKLM:\Software\SVS\Deployment'
|
||||
|
||||
try {
|
||||
if (Test-Path $regKey) {
|
||||
Remove-Item -Path $regKey -Recurse -Force
|
||||
Write-LogHybrid "Registry key '$regKey' deleted successfully." "Success" "SVSModule" -LogToEvent
|
||||
}
|
||||
else {
|
||||
Write-LogHybrid "Registry key '$regKey' not found; nothing to delete." "Info" "SVSModule" -LogToEvent
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-LogHybrid "Failed to delete registry key '$regKey': $($_.Exception.Message)" "Error" "SVSModule" -LogToEvent
|
||||
}
|
||||
}
|
||||
|
||||
# Remove the custom repository if registered
|
||||
if (Get-PSRepository -Name SVS_Repo -ErrorAction SilentlyContinue) {
|
||||
try {
|
||||
@@ -377,6 +360,23 @@ $ConfirmPreference = 'None'
|
||||
}
|
||||
}
|
||||
|
||||
function Remove-SVSDeploymentRegKey {
|
||||
$regKey = 'HKLM:\Software\SVS\Deployment'
|
||||
|
||||
try {
|
||||
if (Test-Path $regKey) {
|
||||
Remove-Item -Path $regKey -Recurse -Force
|
||||
Write-LogHybrid "Registry key '$regKey' deleted successfully." "Success" "SVSModule" -LogToEvent
|
||||
}
|
||||
else {
|
||||
Write-LogHybrid "Registry key '$regKey' not found; nothing to delete." "Info" "SVSModule" -LogToEvent
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-LogHybrid "Failed to delete registry key '$regKey': $($_.Exception.Message)" "Error" "SVSModule" -LogToEvent
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Perform-ToolkitInstallation {
|
||||
|
||||
Reference in New Issue
Block a user