diff --git a/Get-PC/Get-PC.psd1 b/Get-PC/Get-PC.psd1 index de9d3a6..d893de1 100644 --- a/Get-PC/Get-PC.psd1 +++ b/Get-PC/Get-PC.psd1 @@ -12,7 +12,7 @@ RootModule = 'Get-PC.psm1' # Version number of this module. -ModuleVersion = '0.4.15' +ModuleVersion = '0.4.16' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/Get-PC/Private/ViewerRemote.ps1 b/Get-PC/Private/ViewerRemote.ps1 index 97463bf..6d795e9 100644 --- a/Get-PC/Private/ViewerRemote.ps1 +++ b/Get-PC/Private/ViewerRemote.ps1 @@ -5,28 +5,20 @@ Write-Host "Exiting Viewer Remote...No connection made to [$ComputerName]" -ForegroundColor Red break } - - $RemoteViewerPath = "C:\Program Files (x86)\ConfigMgr\bin\i386\CmRcViewer.exe" - $RemoteViewerPathAdd = "C:\Program Files (x86)\ConfigMgr Console\bin\i386\CmRcViewer.exe" - $RemoteViewerPathAdd2 = "C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\i386\CmRcViewer.exe" - if(Test-Path $RemoteViewerPath) - { + $paths = @( + "C:\Program Files (x86)\ConfigMgr\bin\i386\CmRcViewer.exe", + "C:\Program Files (x86)\ConfigMgr Console\bin\i386\CmRcViewer.exe", + "C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\i386\CmRcViewer.exe", + "C:\Program Files\CMremoteControl\CmRcViewer.exe" + ) + + foreach ($path in $paths) { + if (-not (Test-path $path)) { continue } Write-Host "Attempting to remote into [$ComputerName]..." -ForegroundColor Green - Start $RemoteViewerPath $ComputerName - - }elseif(Test-Path $RemoteViewerPathAdd) - { - Write-Host "Attempting to remote into [$ComputerName]..." -ForegroundColor Green - Start $RemoteViewerPathAdd $ComputerName - - }elseif(Test-Path $RemoteViewerPathAdd2) - { - Write-Host "Attempting to remote into [$ComputerName]..." -ForegroundColor Green - Start $RemoteViewerPathAdd2 $ComputerName - - }else{ - - Write-Host "`nRemote Viewer Install Path Not Found...`nPlease install Config Manager Thick Client" -ForegroundColor Red - } + Start-Process $path $ComputerName + return + } + + Write-Host "`nRemote Viewer Install Path Not Found...`nPlease install Config Manager Thick Client" -ForegroundColor Red } diff --git a/Get-PC/patchnotes.txt b/Get-PC/patchnotes.txt index 81de4b4..3067082 100644 --- a/Get-PC/patchnotes.txt +++ b/Get-PC/patchnotes.txt @@ -1,5 +1,6 @@ -Patch +Patch 2025-2-24 -Fix Devices and DevicesUnplugged 1.4x speedup +-Add More possible paths for Config Manager Remote Viewer Patch 2025-2-13 -Add HostnamesByPrinter to list hostnames with printer installed