Data Collection Parity Reference

Comprehensive comparison of data fields collected by the remote and local PowerShell scripts, including collection methods and API mapping.

Table of Contents


Overview

Both the remote and local collection scripts are designed to collect the same data fields for shopfloor PCs. This document provides a comprehensive reference for what data is collected, how it's collected, and any differences between the two approaches.

Goal: Any field collected by one script should also be collected by the other (where technically feasible).


Scripts Compared

Aspect Remote Script Local Script
Name Update-ShopfloorPCs-Remote.ps1 Update-PC-CompleteAsset.ps1
Location S:\dt\shopfloor\scripts\remote-execution\ S:\dt\shopfloor\scripts\complete-asset\
Execution From admin workstation via WinRM Directly on target PC
Context SYSTEM via WinRM Local user or SYSTEM
Batch Support Yes (many PCs) No (one PC at a time)
WinRM Required Yes No

Quick Reference Tables

Complete Field Parity Status

Category Field Remote Local Parity
System Hostname
Serial Number
Service Tag
Manufacturer
Model
Total Physical Memory
Domain Role
OS Version
Last Boot Time
Current Time Zone
Logged In User
PC Type
Machine No
DNC Site
CNC
NcIF
Host Type
FTP Primary
FTP Secondary
GE Registry 32-bit Present
64-bit Present
Dual Path Enabled
Path 1 Name
Path 2 Name
Network Interface Name
IP Address
Subnet Mask
Default Gateway
MAC Address
Is DHCP
Is Active
Is Machine Network
Is Primary
Apps Serial Ports
Has VNC
All Installed Apps
Tracked Applications
UDC Running
CLM Running
Printer Default Printer FQDN
Local Only V-Drive Access N/A
C:\Apps Folder N/A

Legend: ✓ = Collected, ✗ = Not collected, N/A = Not applicable


Detailed Field Reference

Basic System Information

Hostname

Serial Number

Service Tag

Total Physical Memory

Domain Role

Current Time Zone

PC Type


DNC Configuration

DNC General Settings

DNC Config Fields:

Field Registry Key API Key
Site Site dncConfig.Site
CNC Cnc dncConfig.CNC
NcIF NcIF dncConfig.NcIF
Machine No MachineNo dncConfig.MachineNo
Host Type HostType dncConfig.HostType
FTP Primary FtpHostPrimary dncConfig.FtpHostPrimary
FTP Secondary FtpHostSecondary dncConfig.FtpHostSecondary

GE Registry Information

Registry Presence

Dual Path Configuration


Network Interfaces

Both scripts collect all active network interfaces with these fields:

Field Description API Key
InterfaceName Adapter name interfaceName
IPAddress IPv4 address ipAddress
SubnetMask CIDR prefix length subnetMask
DefaultGateway Gateway address defaultGateway
MACAddress Physical address macAddress
IsDHCP DHCP enabled isDhcp
IsActive Interface is up isActive
IsMachineNetwork 192.168.. or 100.0.0.* address isMachineNetwork
IsPrimary 10.134.. address isPrimary

Network Classification:


Application Detection

Serial Ports

  [
    {"PortName": "COM1", "Description": "Communications Port"},
    {"PortName": "COM3", "Description": "USB Serial Port"}
  ]

VNC Detection

  1. Registry check for VNC Server/Connect/RealVNC in Uninstall keys
  2. Service check for vncserver* services

All Installed Applications

Tracked Applications

  [
    {"appid": 2, "appname": "UDC", "version": "2.1.0", "isactive": 1},
    {"appid": 15, "appname": "Tanium", "version": "7.4.2", "isactive": 1}
  ]

Printer Information

Default Printer FQDN


Collection Methods

Remote Script Data Flow

Admin Workstation                    Target PC
       │                                │
       │  Invoke-Command (WinRM)        │
       ├───────────────────────────────→│
       │                                │  ┌─────────────────────┐
       │                                │  │ Collect data:       │
       │                                │  │ - CIM instances     │
       │                                │  │ - Registry          │
       │                                │  │ - Processes         │
       │                                │  │ - Network config    │
       │                                │  └─────────────────────┘
       │                                │
       │  Return $result hashtable      │
       │←───────────────────────────────┤
       │                                │
       │  ┌──────────────────────────┐  │
       │  │ Send-PCDataToApi         │  │
       │  │ POST to ShopDB API       │  │
       │  └──────────────────────────┘  │
       │                                │
       │  HTTP POST to API              │
       ├───────────────────────────────→│ ShopDB Server

Local Script Data Flow

Target PC
    │
    │  ┌────────────────────────────────┐
    │  │ Collect-SystemInfo             │
    │  │ - CIM instances                │
    │  │ - Registry                     │
    │  │ - Processes                    │
    │  └────────────────────────────────┘
    │
    │  ┌────────────────────────────────┐
    │  │ Get-ShopfloorConfigurations    │
    │  │ - Network interfaces           │
    │  │ - DNC config                   │
    │  │ - GE Registry                  │
    │  └────────────────────────────────┘
    │
    │  ┌────────────────────────────────┐
    │  │ Send-CompleteDataToDashboard   │
    │  │ POST to ShopDB API             │
    │  └────────────────────────────────┘
    │
    │  HTTP POST to API
    ├───────────────────────────────────→ ShopDB Server

API Parameter Mapping

updateCompleteAsset Action

Category API Parameter Remote Source Local Source
Basic hostname $result.Hostname $systemInfo.Hostname
serialNumber $result.SerialNumber $systemInfo.SerialNumber
serviceTag $result.ServiceTag $systemInfo.ServiceTag
manufacturer $result.Manufacturer $systemInfo.Manufacturer
model $result.Model $systemInfo.Model
pcType $result.PCType $systemInfo.PCType
loggedInUser $result.LoggedInUser $systemInfo.LoggedInUser
machineNo $result.MachineNo $systemInfo.MachineNo
osVersion $result.OSVersion $systemInfo.OSVersion
lastBootUpTime $result.LastBootUpTime $systemInfo.LastBootUpTime
totalPhysicalMemory $result.TotalPhysicalMemory $systemInfo.TotalPhysicalMemory
domainRole $result.DomainRole $systemInfo.DomainRole
currentTimeZone $result.CurrentTimeZone $systemInfo.CurrentTimeZone
VNC hasVnc $result.HasVnc $systemInfo.HasVnc
Serial serialPorts $result.SerialPorts (JSON) $systemInfo.SerialPorts (JSON)
Apps allInstalledApps $result.AllInstalledApps $systemInfo.AllInstalledApps
allInstalledAppsCount $result.AllInstalledAppsCount $systemInfo.AllInstalledAppsCount
Printer defaultPrinterFQDN $result.DefaultPrinterFQDN Get-DefaultPrinterFQDN
Network networkInterfaces $result.NetworkInterfaces (JSON) $shopfloorInfo.NetworkInterfaces (JSON)
Comm commConfigs $result.CommConfigs (JSON) $shopfloorInfo.CommConfigs (JSON)
DNC dncConfig $result.DNCConfig (JSON) $shopfloorInfo.DNCConfig (JSON)
dncGeRegistry32Bit $result.GERegistryInfo.Registry32Bit $shopfloorInfo.GERegistryInfo.Registry32Bit
dncGeRegistry64Bit $result.GERegistryInfo.Registry64Bit $shopfloorInfo.GERegistryInfo.Registry64Bit
dncDualPathEnabled $result.GERegistryInfo.DualPathEnabled $shopfloorInfo.GERegistryInfo.DualPathEnabled
dncPath1Name $result.GERegistryInfo.Path1Name $shopfloorInfo.GERegistryInfo.Path1Name
dncPath2Name $result.GERegistryInfo.Path2Name $shopfloorInfo.GERegistryInfo.Path2Name

Testing Parity

Manual Parity Test

Run both scripts on the same PC and compare results:

Step 1: Run Local Script

# On target PC
.\Update-PC-CompleteAsset.ps1 -DashboardURL "http://dev-server/api.asp" > local-output.txt

Step 2: Run Remote Script

# From admin workstation
.\Update-ShopfloorPCs-Remote.ps1 -ComputerName "TARGET-PC" -ApiUrl "http://dev-server/api.asp" > remote-output.txt

Step 3: Compare Database Records

-- Check if both created/updated the same record
SELECT * FROM machines WHERE hostname = 'TARGET-PC' ORDER BY lastupdated DESC LIMIT 2;

-- Compare specific fields
SELECT hostname, serialnumber, pctype, totalphysicalmemory, domainrole
FROM machines WHERE hostname = 'TARGET-PC';

Automated Parity Check Script

# parity-test.ps1
param(
    [Parameter(Mandatory)]
    [string]$ComputerName,
    [PSCredential]$Credential
)

# Run remote collection
$remoteData = .\Update-ShopfloorPCs-Remote.ps1 -ComputerName $ComputerName -Credential $Credential -WhatIf

# Fields to compare
$fields = @(
    'Hostname', 'SerialNumber', 'ServiceTag', 'Manufacturer', 'Model',
    'TotalPhysicalMemory', 'DomainRole', 'CurrentTimeZone', 'PCType',
    'HasVnc', 'AllInstalledAppsCount'
)

# Output comparison
foreach ($field in $fields) {
    Write-Host "$field : $($remoteData.$field)"
}

Known Differences

Local-Only Fields

These fields can only be collected by the local script:

Field Reason
V-Drive Access Requires user's mapped network drives
C:\Apps Folder Access Network permissions differ in WinRM context

Context Differences

Aspect Remote Local
User context SYSTEM (via WinRM) Logged-in user or SYSTEM
Network drives Not accessible Accessible
User registry (HKCU) SYSTEM's HKCU User's HKCU
Per-user apps Via HKU enumeration Via HKU + HKCU

PC Type Detection

Both scripts use the same detection priority:

  1. Dashboard (GE Aerospace Dashboard)
  2. Lobby Display (GE Aerospace Lobby Display)
  3. CMM (PC-DMIS, goCMM, DODA)
  4. Wax Trace (FormTracePak, FormStatusMonitor)
  5. Keyence (VR-3000/5000/6000)
  6. EAS1000 (GageCal, NI Software)
  7. Genspect
  8. Heat Treat
  9. Inspection (machine number based)
  10. Shopfloor (default for domain shop PCs)

Additional local-only types: