Add WinRM filter, VNC IP fallback, UDC/CLM process detection
displaypcs.asp: - Replace "All Time" filter with WinRM status filter - Options: All, Needs WinRM (Has Equipment), Has WinRM, No WinRM - Add VNC IP fallback when hostname unavailable displaypc.asp: - Add VNC IP fallback when hostname unavailable api.asp: - Add isactive field support for installedapps table - UDC/CLM process detection sets isactive=1 if running, 0 if not displaymachines.asp: - Fix to exclude PC machine types (machinetypeid >= 33) - PCs were incorrectly showing on equipment list Update-ShopfloorPCs-Remote.ps1: - Add UDC.exe and PPMon.exe (CLM) process detection - Set isactive flag based on running process - Add 10.134.* to TrustedHosts for IP fallback connections Update-PC-CompleteAsset.ps1: - Add UDC/CLM process detection for local execution - Set isactive flag on tracked applications 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -245,9 +245,9 @@ function Add-TrustedHosts {
|
||||
Write-Log "Current TrustedHosts: $(if ($currentHosts) { $currentHosts } else { '(empty)' })" -Level "INFO"
|
||||
|
||||
if ($TrustAllInDomain) {
|
||||
# Trust all hosts in the domain (wildcard)
|
||||
$newValue = "*.$DnsSuffix"
|
||||
Write-Log "Adding wildcard trust for: $newValue" -Level "INFO"
|
||||
# Trust all hosts in the domain (wildcard) AND the shopfloor IP subnet for IP fallback
|
||||
$newValue = "*.$DnsSuffix,10.134.*"
|
||||
Write-Log "Adding wildcard trust for: *.$DnsSuffix and 10.134.* (IP fallback)" -Level "INFO"
|
||||
} else {
|
||||
# Build list of FQDNs to add
|
||||
$fqdnsToAdd = @()
|
||||
@@ -296,9 +296,9 @@ function Show-TrustedHostsHelp {
|
||||
Write-Host "Since you're not on the same domain as the shopfloor PCs," -ForegroundColor White
|
||||
Write-Host "you need to add them to your TrustedHosts list." -ForegroundColor White
|
||||
Write-Host ""
|
||||
Write-Host "OPTION 1: Trust all PCs in the domain (Recommended)" -ForegroundColor Yellow
|
||||
Write-Host "OPTION 1: Trust all PCs in the domain + IP fallback (Recommended)" -ForegroundColor Yellow
|
||||
Write-Host " Run as Administrator:" -ForegroundColor Gray
|
||||
Write-Host ' Set-Item WSMan:\localhost\Client\TrustedHosts -Value "*.logon.ds.ge.com" -Force' -ForegroundColor Green
|
||||
Write-Host ' Set-Item WSMan:\localhost\Client\TrustedHosts -Value "*.logon.ds.ge.com,10.134.*" -Force' -ForegroundColor Green
|
||||
Write-Host ""
|
||||
Write-Host "OPTION 2: Trust specific PCs" -ForegroundColor Yellow
|
||||
Write-Host " Run as Administrator:" -ForegroundColor Gray
|
||||
@@ -546,6 +546,37 @@ function Get-RemotePCInfo {
|
||||
}
|
||||
}
|
||||
}
|
||||
# ================================================================
|
||||
# Detect running processes for UDC and CLM to set isactive
|
||||
# ================================================================
|
||||
$udcRunning = $false
|
||||
$clmRunning = $false
|
||||
|
||||
# Check for UDC process
|
||||
$udcProcess = Get-Process -Name "UDC" -ErrorAction SilentlyContinue
|
||||
if ($udcProcess) { $udcRunning = $true }
|
||||
|
||||
# Check for CLM process (PPMon.exe)
|
||||
$clmProcess = Get-Process -Name "PPMon" -ErrorAction SilentlyContinue
|
||||
if ($clmProcess) { $clmRunning = $true }
|
||||
|
||||
# Update matched apps with isactive status
|
||||
foreach ($app in $matchedApps) {
|
||||
if ($app.appid -eq 2) {
|
||||
# UDC
|
||||
$app.isactive = if ($udcRunning) { 1 } else { 0 }
|
||||
} elseif ($app.appid -eq 4) {
|
||||
# CLM
|
||||
$app.isactive = if ($clmRunning) { 1 } else { 0 }
|
||||
} else {
|
||||
# Other apps - default to active if installed
|
||||
$app.isactive = 1
|
||||
}
|
||||
}
|
||||
|
||||
$result.UDCRunning = $udcRunning
|
||||
$result.CLMRunning = $clmRunning
|
||||
|
||||
# Store matched apps as JSON string to survive WinRM serialization
|
||||
$result.MatchedAppsCount = $matchedApps.Count
|
||||
$result.MatchedAppNames = ($matchedApps | ForEach-Object { $_.appname }) -join ", "
|
||||
|
||||
Reference in New Issue
Block a user