# About
> Custom fields allow you to publish data about a user, endpoint, organization, or location in NinjaOne. You create the custom fields and then use those fields to populate the Custom tabs on the dashboards.
> \- [NinjaOne Custom Fields: Setup - NinjaOne Dojo](https://ninjarmm.zendesk.com/hc/en-us/articles/360060920631)
# Info
- [NinjaOne Custom Fields: Resource Catalog - NinjaOne Dojo](https://ninjarmm.zendesk.com/hc/en-us/articles/31136116470285)
- [Custom Fields: Types and Functionality](https://ninjarmm.zendesk.com/hc/en-us/articles/18601842971789)
- Defines and describes the types of custom fields.
- [Custom Fields and Documentation: CLI and Scripting](https://ninjarmm.zendesk.com/hc/en-us/articles/4405408656013)
- This documentation explains how to use the `ninjarmm-cli` component including interacting with custom fields.
- [Command Line Interface (CLI): Supported Fields and Functionality](https://ninjarmm.zendesk.com/hc/en-us/articles/16973443979789)
- https://ninjarmm.zendesk.com/hc/en-us/articles/360020837911-Automation-Library-Parameters
# NinjaOne CLI
[This documentation explains how to use the `ninjarmm-cli` component for Windows, macOS, and Linux operating systems (OS).](https://ninjarmm.zendesk.com/hc/en-us/articles/4405408656013)
## Clear Custom Field
```PowerShell
Set-ExecutionPolicy -Scope Process Unrestricted
Import-Module njclipsh
Ninja-Property-Clear $AttributeName
```
# NinjaOne Scripting
- [Reading from or Writing to Custom Fields in Scripts - NinjaOne Dojo](https://ninjarmm.zendesk.com/hc/en-us/articles/22328250934669)
## Read Custom Field
```PowerShell
Ninja-Property-Get fieldName
```
### Example: Get Printix ID
#### Windows
```PowerShell
$PrintixTenantId = Ninja-Property-Get printixTenantId
```
#### MacOS
```bash
# Ninja Custom Fields on MacOS
ninjaCLI="$NINJA_DATA_PATH/ninjarmm-cli"
# Get the organization custom field information.
printixTenantId=$("$ninjaCLI" "get" "printixTenantId")
printixTenantDomain=$("$ninjaCLI" "get" "printixTenantDomain")
# Short circuit if the Ninja Custom Fields are not set
if [ -z "$printixTenantId" ] || [ -z "$printixTenantDomain" ]; then
echo "$(date) | WARN: Ninja Custom Fields not set. Exiting."
exit 0
```
## Write Custom Field
```PowerShell
Ninja-Property-Set fieldName
```
### Example: Print Timestamp
```PowerShell
# Set timestamp for when the password was last updated (ISO DateTime format in UTC)
$timestamp = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss")
Ninja-Property-Set localAdminPasswordLastUpdated $timestamp
Write-Host "Date stored in NinjaOne custom field 'localAdminPasswordLastUpdated': $timestamp UTC" -ForegroundColor Green
```