---
updatedAt: 2025-08-14T13:33:37.000Z
agentTools:
  siteIndex: https://developer.n-able.com/llms.txt
  projectIndex: https://developer.n-able.com/n-central/llms.txt
---

# Export Custom Device Property Values - PowerShell

```powershell PowerShell
#This script was create by Adriaan Sluis, from Tosch (www.tosch.nl) using his N-central Powershell Module
#It allows you to export the values of a specified Custom Property for a specified Customer
#For example if you save Bitlocker Recovery Keys in N-central, you can export the entire list using this script


#To establish a connection to your N-central server, enter your N-central Server FQDN and Json Web Token between the "" below

$ServerFQDN = "ncod900.n-able.com"
$JsonWebToken = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

New-NCentralConnection -ServerFQDN $ServerFQDN -JWT $JsonWebToken

#The Outfile is the location were the results will be saved

$OutFile = "C:\Temp\BitlockerKeys.txt"

#The CustomerID can be located in your N-central server under Administration>Customers, it is the Access Code for the customer you wish to query

$CustomerID = 101

#The CDP is the name of the custom property you wish to export

$CDP="Bitlocker Key"
,(get-ncdevicelist $CustomerID | Tee-Object -variable LookUpList) |
    get-ncdevicepropertylist |
    Select-object DeviceID,
                @{n="DeviceName" ; e={$DID=$_.deviceid ; (@($LookupList).Where({ $_.deviceid -eq $DID})).longname}},
                $CDP -ErrorAction SilentlyContinue | Out-File $OutFile
```

```json Response Example
{"success":true}
```

# Export Custom Device Property Values - PowerShell