From 64e1f7e08812b5cc8e8a0ffb144f6822a1f95194 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Tue, 30 Jun 2026 16:31:12 -0400 Subject: [PATCH] Report-AssetToShopDB: log OS + boot time in the POST line Adds os= and boot= to the POST log line so report-asset-*.log shows whether the PC actually grabbed the OS version and LastBootUpTime (uptime source). Co-Authored-By: Claude Opus 4.8 (1M context) --- .../gea-shopfloor-collections/Report-AssetToShopDB.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbook/shopfloor-setup/gea-shopfloor-collections/Report-AssetToShopDB.ps1 b/playbook/shopfloor-setup/gea-shopfloor-collections/Report-AssetToShopDB.ps1 index 6c29b72..e97d9d5 100644 --- a/playbook/shopfloor-setup/gea-shopfloor-collections/Report-AssetToShopDB.ps1 +++ b/playbook/shopfloor-setup/gea-shopfloor-collections/Report-AssetToShopDB.ps1 @@ -267,8 +267,8 @@ if ($manufacturer) { $body['manufacturer'] = $manufacturer } if ($model) { $body['model'] = $model } if ($lastBootTime) { $body['lastBootTime'] = $lastBootTime } -Log ("POST {0} host={1} serial={2} pcType={3} make={4} model={5} machineNo={6} user={7} ips={8}" -f ` - $ApiUrl, $hostname, $serialNumber, $pcType, $manufacturer, $model, $machineNo, $loggedInUser, (($interfaces | ForEach-Object { $_.IPAddress }) -join ',')) +Log ("POST {0} host={1} serial={2} pcType={3} make={4} model={5} os={6} boot={7} machineNo={8} user={9} ips={10}" -f ` + $ApiUrl, $hostname, $serialNumber, $pcType, $manufacturer, $model, $osVersion, $lastBootTime, $machineNo, $loggedInUser, (($interfaces | ForEach-Object { $_.IPAddress }) -join ',')) try { $resp = Invoke-RestMethod -Uri $ApiUrl -Method Post -Body $body -TimeoutSec $TimeoutSec -ErrorAction Stop