Add Zmiana pola wyszukiwania (search-term)
41
Zmiana pola wyszukiwania %28search-term%29.-.md
Normal file
41
Zmiana pola wyszukiwania %28search-term%29.-.md
Normal file
@@ -0,0 +1,41 @@
|
||||
### Pole wyszukiwania określa, jak agent identyfikuje asset w Snipe-IT.
|
||||
|
||||
Znajduje się w `config.json`:
|
||||
|
||||
```json
|
||||
"search-term": {
|
||||
"type": "serial",
|
||||
"value": "(Get-CimInstance Win32_BIOS).SerialNumber"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Parametry:
|
||||
|
||||
- `type` – typ wyszukiwania w Snipe-IT (np. `serial`, `asset_tag`, inne wspierane przez API)
|
||||
|
||||
- `value` – komenda PowerShell zwracająca wartość
|
||||
|
||||
|
||||
### Przykłady:
|
||||
|
||||
**Serial BIOS:**
|
||||
|
||||
```powershell
|
||||
(Get-CimInstance Win32_BIOS).SerialNumber
|
||||
|
||||
```
|
||||
|
||||
**Hostname:**
|
||||
|
||||
```powershell
|
||||
$env:COMPUTERNAME
|
||||
|
||||
```
|
||||
|
||||
**Custom (np. TeamViewer ID):**
|
||||
|
||||
```powershell
|
||||
(Get-ItemProperty 'HKLM:\SOFTWARE\TeamViewer').ClientID
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user