Adds Report-AssetToShopDB.ps1 (Type=PS1, DetectionMethod=Always manifest entry) for collections PCs. Reads hostname, BIOS serial, eDNC MachineNo and the corp NIC IPv4 (filtered to WJ corp ranges, controller NIC dropped) and POSTs action=updateCompleteAsset to ShopDB api.asp, which upserts the machine, stores the IP, and links the PC to its machine-number equipment. manifest-entry-report-asset.json is the snippet to merge into the SFLD share collections manifest (+ stage the script under apps/). Note: relies on the ShopDB api.asp LogToFile Err-leak fix (separate shopdb repo commit) to create the relationship reliably. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9 lines
1.1 KiB
JSON
9 lines
1.1 KiB
JSON
{
|
|
"_comment": "Drop this entry into the SFLD share at \\tsgwp00525\\sfld$\\v2\\shared\\dt\\shopfloor\\gea-shopfloor-collections\\manifest.json (Applications array). Place Report-AssetToShopDB.ps1 in the apps/ dir on the share. Type=PS1 + DetectionMethod=Always means GE-Enforce runs it straight off the share every cycle (at-logon, periodic 5-min, shift-change) under SYSTEM, no local copy. The script reads hostname, BIOS serial, eDNC MachineNo and the corp/AESFMA IPv4 (filtered to WJ corp ranges 10.134.48.0/23 + 10.48.249.0/26) and POSTs action=updateCompleteAsset to ShopDB. api.asp upserts the machines row by hostname, clears+reinserts interface rows, and recreates the PC-to-machine relationship from machineNo, so repeat fires are safe. Override the ShopDB URL with the Args field if the host/path moves, e.g. \"Args\": \"-ApiUrl https://newhost/shopdb/api.asp\".",
|
|
"Name": "Report asset (host + IP + machine number) to ShopDB",
|
|
"PCTypes": ["gea-shopfloor-collections"],
|
|
"Script": "apps/Report-AssetToShopDB.ps1",
|
|
"Type": "PS1",
|
|
"DetectionMethod": "Always"
|
|
}
|