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) <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user