diff --git a/Get-PC/Data/AppsToIgnore.txt b/Get-PC/Data/AppsToIgnore.txt new file mode 100644 index 0000000..c8e4c16 --- /dev/null +++ b/Get-PC/Data/AppsToIgnore.txt @@ -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 \ No newline at end of file diff --git a/Get-PC/Data/ExpectedApps.txt b/Get-PC/Data/ExpectedApps.txt new file mode 100644 index 0000000..12e80bd Binary files /dev/null and b/Get-PC/Data/ExpectedApps.txt differ diff --git a/Get-PC/Data/SHSApps.json b/Get-PC/Data/SHSApps.json new file mode 100644 index 0000000..133abce --- /dev/null +++ b/Get-PC/Data/SHSApps.json @@ -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" + } +] \ No newline at end of file diff --git a/Get-PC/Private/Apps.ps1 b/Get-PC/Private/Apps.ps1 index 2dd97bf..4f87d68 100644 --- a/Get-PC/Private/Apps.ps1 +++ b/Get-PC/Private/Apps.ps1 @@ -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 diff --git a/Get-PC/Private/WinProfileRebuild.ps1 b/Get-PC/Private/WinProfileRebuild.ps1 index 15854d8..8d58bdc 100644 --- a/Get-PC/Private/WinProfileRebuild.ps1 +++ b/Get-PC/Private/WinProfileRebuild.ps1 @@ -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 } \ No newline at end of file