Device Labeling - How To
Introduction
Labels are assigned to devices during installation, allowing you to group devices for easier identification and management. Once a label is assigned, you can quickly locate and manage all devices associated with that label.
Minimum GYTPOL Sensor versions required for Device Labeling:
Windows: 2.36.X
Linux and macOS: 1.29.X.Y
Backend version: 2.16.6
GYTPOL Sensor Location
Navigate to “System Health” screen located in the “Settings” section.
Download the GYTPOL Sensor for your respective operating system using the download icon.
After downloading, you can deploy the sensor using any deployment tool available. To assign labels to devices, follow these guidelines:
Labels must be between 2 and 32 characters long.
Labels may only contain letters, numbers, underscores (
_
), or hyphens (-
).You can assign multiple labels by separating them with commas (e.g.,
prod,region-eu,secure_node
).
For additional reference, please see the UI2 - Sensor Deployment and Management Guide document.
Deployment examples and arguments
Windows
Label: accounting
Path to the MSI installation file (including the file name): c:\GYTPOL\gytpolClient_x64.msi
Installation command with the accounting label: msiexec /i c:\GYTPOL\gytpolClient_x64.msi LABELS=accounting
This command must be executed with administrative privileges. You can either:
Run it manually from an elevated Command Prompt (Run as Administrator), or
Use a deployment tool (e.g., Intune, SCCM, GPO, etc.) that runs with elevated privileges.
Linux (DEB)
Label: engineering
Path to the DEB installation file (including the file name): /opt/gytpol/gytpol-client_1.30.1.21-113_amd64.deb
Installation command with the engineering label: sudo dpkg -i /opt/gytpol/gytpol-client_1.30.1.21-113_amd64.deb && sudo /opt/gytpol/gytlnx -set-labels engineering
Linux (RPM)
Label: healthcare
Path to the RPM / DEB installation file (including the file name): /opt/gytpol/gytpol-client_1.30.1.21-113_amd64.rpm
Installation command with the healthcare label: sudo rpm -ivh /opt/gytpol/gytpol-client_1.30.1.21-113_amd64.deb && sudo /opt/gytpol/gytlnx -set-labels healthcare
macOS
Label: devops
Path to the RPM / DEB installation file (including the file name): /opt/gytpol/1.30.1.22_126/gytpol-client-1.30.1.22-126_arm64.pkg
Installation command with the devops label: sudo /usr/sbin/installer -pkg /opt/gytpol/1.30.1.22_126/gytpol-client-1.30.1.22-126_arm64.pkg -target / && sudo /opt/gytpol/gytmac -set-labels devops
Assigning Labels After Deployment
After deploying the GYTPOL sensor, you can assign or update one or more labels on the device using the provided CLI tools. This is useful for classifying devices into groups for reporting, policy targeting, or operational segmentation.
Windows
"C:\Program Files\WindowsPowerShell\Modules\gytpol\Client\fw4_6_2\GytpolClientFW4_6_2.exe" set-labels finance,remote-office
Linux (DEB-based)
sudo /opt/gytpol/gytlnx -set-labels engineering,test-lab
Linux (RPM-based)
sudo /opt/gytpol/gytlnx -set-labels healthcare,critical-assets
macOS
sudo /opt/gytpol/gytmac -set-labels devops,ci-runner
Where to find the labels
After updating the labels, they will be visible in the UI only after a full scan has been completed.
You can locate the labels in the UI under: System-Health > Device Manifest > Device Information
How to Manage Devices Using Labels
Adding Devices to Groups
Use the "Labels" filter to group devices.
This will display all devices associated with the selected label, enabling effective organization and management.
For additional reference, please see the UI2 - Creating Computer Groups document.
Filtering Devices in the Device Manifest:
In the Device Manifest, apply the label filter to display all devices associated with a specific label.
This simplifies viewing and managing devices linked to a particular label.
Optional: Managing Labels via PowerShell Scripts on Windows Devices
You can optionally manage custom labels assigned to the GYTPOL Sensor by directly editing the state.json configuration file using PowerShell scripts.
The following scripts allow you to add new labels or remove them entirely from the configuration file located on the device. Use these scripts during deployment or for post-installation adjustments.
Adding labels
# Path to the JSON file
$jsonPath = "C:\Program Files\WindowsPowerShell\Modules\gytpol\Config\state.json"
# Input: one or more comma-separated labels
$inputLabels = "prod,region=eu-west,secure" # <-- Change this line or make it a param
# Convert to array and trim spaces
$newLabels = $inputLabels -split ',' | ForEach-Object { $_.Trim() }
# Load and parse JSON
$json = Get-Content -Path $jsonPath -Raw | ConvertFrom-Json
# Initialize 'labels' if null
if ($null -eq $json.labels) {
$json.labels = @()
}
# Add each label if it doesn't exist
foreach ($label in $newLabels) {
if (-not [string]::IsNullOrWhiteSpace($label) -and -not $json.labels.Contains($label)) {
$json.labels += $label
}
}
# Save updated JSON
$json | ConvertTo-Json -Depth 5 | Set-Content -Path $jsonPath -Encoding UTF8
Removing Labels
# Path to the JSON file
$jsonPath = "C:\Program Files\WindowsPowerShell\Modules\gytpol\Config\state.json"
# Load and parse JSON
$json = Get-Content -Path $jsonPath -Raw | ConvertFrom-Json
# Remove all labels by setting to $null
$json.labels = $null
# Save updated JSON
$json | ConvertTo-Json -Depth 5 | Set-Content -Path $jsonPath -Encoding UTF8