refractor

- refractor scans into one function
- create Invoke-WinUtilInitializeModule Function & use it accordingly
- refractor Update Installation process
- refractor DataGrid Item-management through Itemsource for better Main Thread performance
This commit is contained in:
MyDrift
2025-03-08 09:49:05 +01:00
parent 27a97e4650
commit f8b7f626d8
9 changed files with 280 additions and 199 deletions

View File

@ -2417,13 +2417,7 @@
Set-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore\" -Name \"SystemRestorePointCreationFrequency\" -Value \"0\" -Type DWord -Force -ErrorAction Stop | Out-Null
}
# Attempt to load the required module for Get-ComputerRestorePoint
try {
Import-Module Microsoft.PowerShell.Management -ErrorAction Stop
} catch {
Write-Host \"Failed to load the Microsoft.PowerShell.Management module: $_\"
return
}
Invoke-WinUtilInitializeModule -module \"Microsoft.PowerShell.Management\"
# Get all the restore points for the current day
try {