"fields": { "custom_fields": { "_snipeit_example_1": { "name": "Example Field", "enabled": true, "ps_command": "Get-Date", "float_number": false } } }
name – nazwa pola (tylko informacyjna)
name
enabled – czy pole jest aktywne
enabled
ps_command – komenda PowerShell zwracająca wartość
ps_command
float_number – (opcjonalne) czy wynik ma być traktowany jako liczba
float_number
"_snipeit_ram_4": { "name": "RAM (GB)", "enabled": true, "ps_command": "[math]::Round((Get-CimInstance Win32_ComputerSystem).TotalPhysicalMemory / 1GB, 0)" }
"_snipeit_disk_type_27": { "name": "Disk Type", "enabled": true, "ps_command": "($d=Get-CimInstance Win32_DiskDrive|Select-Object -First 1)|Out-Null;if($d.Model -match 'NVMe'){'NVMe'}elseif($d.MediaType -match 'SSD'){'SATA SSD'}elseif($d.MediaType -match 'HDD'){'HDD'}else{'Unknown'}" }
Deleting the wiki page "Dodawanie custom fields" cannot be undone. Continue?