Added files from last commit (oops) and enabled errors in WinProfileRebuild Restore

This commit is contained in:
Zachary Gorman 2025-04-28 15:18:07 -07:00
parent 2ed258361f
commit d01bf407c8
5 changed files with 40 additions and 1 deletions

View file

@ -0,0 +1,17 @@
Hyland Web ActiveX Controls
Intel(R) Processor Graphics
Microsoft Visual Studio Setup WMI Provider (default)
NetSupport Manager
Office 16 Click-to-Run Localization Component
Realtek Audio COM Components
Realtek High Definition Audio Driver
Vulkan Run Time Libraries
Microsoft Teams Meeting Add-in for Microsoft Office
Documentation Manager
64 Bit HP CIO Components Installer
Teams Machine-Wide Installer
Google Legacy Browser Support
Maxx Audio Installer
Microsoft Edge Update
Npcap OEM
Dell PointStick Driver

Binary file not shown.

10
Get-PC/Data/SHSApps.json Normal file
View file

@ -0,0 +1,10 @@
[
{
"DisplayName": "OBIX",
"Path": "C:\\Program Files\\CCSI"
},
{
"DisplayName": "GSL Will Call",
"Path": "C:\\Users\\Public\\Desktop\\GSL Will Call Client.url"
}
]

View file

@ -2,6 +2,8 @@
Function Get-Apps($ComputerName, $CompStatus, $TableView) {
if ($CompStatus -eq "Online") {
Write-Progress -Activity "Getting apps for $ComputerName" -Status 'Querying local apps' -PercentComplete 30 -ParentId 1
$SHSAppsPath = Join-Path (get-item $PSScriptRoot).Parent.FullName 'Data\SHSApps.json'
$SHSApps = Get-Content $SHSAppsPath | ConvertFrom-Json
$sblock = {
$32RegPath = 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'
$64RegPath = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*'
@ -13,6 +15,14 @@ Function Get-Apps($ComputerName, $CompStatus, $TableView) {
Add-Member -NotePropertyName x86/x64 -NotePropertyValue 64 -PassThru
$apps += Get-Package |
Add-Member -NotePropertyName Computer -NotePropertyValue $env:ComputerName -PassThru
foreach ($app in ${using:SHSApps}) {
if (Test-Path $app.Path) {
$apps += [PSCustomObject]@{
DisplayName = $apps.DisplayName
Copmuter = $env:ComputerName
}
}
}
$apps | Sort-Object 'x86/x64',DisplayName -Unique
}
#Checks if local computer

View file

@ -212,6 +212,8 @@ function Invoke-WinProfileRebuildRestore {
}
}
$errorSave = $ErrorActionPreference
$ErrorActionPreference = 'Continue'
foreach ( $Folder in $FoldersToCopy ) {
$source = Join-Path $sourcePath $Folder
@ -244,6 +246,6 @@ function Invoke-WinProfileRebuildRestore {
Write-Warning "Path Unreachable"
}
}
$ErrorActionPreference = $errorSave
}