Secure by design
Values are stored as AES-encrypted SecureStrings. The encryption key is tied to the dataset record in addy — scripts never expose the raw credential in source code or logs.
addy · datasets
Datasets store credentials and secrets centrally in addy and deliver them as ready-to-use PSCredential objects — no hardcoded passwords in script files, no manual key management.
No account needed to read this page. Register once you’re ready to create your first Dataset. Also see: PowerShell script template
Core concepts
A Dataset is a named secret slot in addy. Scripts request it by name at runtime — the platform handles encryption, key management, and secure delivery.
Values are stored as AES-encrypted SecureStrings. The encryption key is tied to the dataset record in addy — scripts never expose the raw credential in source code or logs.
get-addydataset returns a PSCredential you can pass directly to Invoke-Command, New-ADUser, Connect-ExchangeOnline, and any other PowerShell command that accepts -Credential.
Rotate a credential in addy once and every script that calls it picks up the new value on its next run — no touching script files, no redeployment, no coordination overhead.
How it works
Setting up a Dataset takes minutes. Once created, any script with the right public/private key pair can load it.
Give the Dataset a name (e.g. svc_addy-AD), enter the credential value, and save. addy encrypts it immediately using AES and stores the SecureString in the dataset record.
get-addydataset in your scriptPass the Dataset name as -datasetName. The function fetches the encrypted value via the addy REST API using your $publickey and $privatekey, decrypts it with the stored AES key, and wraps the result in a PSCredential.
Access the credential object via $ds.credential, or retrieve username and password as plain strings via GetNetworkCredential(). Check $ds.errors first to confirm the load succeeded before using the result.
Code examples
get-addydataset in practiceThe function is included in functions.global.ps1 and available in every admins buddy script after the standard header.
# Load a dataset by name
$ds = get-addydataset -datasetName "svc_addy-AD" -storeLocally $false -username "svc_addy-AD"
# Always check for errors before using the result
if ($ds.errors -gt 0) {
Write-Error "Dataset load failed: $($ds.errormessage -join ', ')"
return
}
# Access as PSCredential (ready for -Credential parameters)
$credential = $ds.credential
# Or retrieve username and password as plain strings
$username = $ds.credential.GetNetworkCredential().username
$password = $ds.credential.GetNetworkCredential().password
# The returned PSCredential works directly with any -Credential parameter
$ds = get-addydataset -datasetName "svc_addy-AD" -storeLocally $false
if ($ds.errors -eq 0) {
# Active Directory
Get-ADUser -Identity "john.doe" -Credential $ds.credential -Server "dc01.contoso.com"
# Remote PowerShell session
$session = New-PSSession -ComputerName "srv01" -Credential $ds.credential
Invoke-Command -Session $session -ScriptBlock { Get-Service }
Remove-PSSession $session
}
# For datasets configured with handling = 2 (plaintext, no SecureString)
# Use this mode for API keys, tokens, and connection strings
$ds = get-addydataset -datasetName "my-api-key" -storeLocally $false
if ($ds.errors -eq 0) {
$apiKey = $ds.value # direct plaintext string
$headers = @{ Authorization = "Bearer $apiKey" }
Invoke-RestMethod -Uri "https://api.example.com/data" -Headers $headers
}
Reference
Full signature of get-addydataset — defined in etc/scripts/functions.global.ps1, line 534.
| Parameter | Alias | Required | Default | Description |
|---|---|---|---|---|
-datasetName |
-keyContext |
Required | — | Name of the Dataset to load. Must match the name set in addy exactly. |
-username |
— | Optional | (datasetName) | Username for the PSCredential object. Falls back to -datasetName when not provided. |
-storeLocally |
-securestringStoreLocal |
Optional | $false |
Cache the AES-encrypted SecureString to disk under C:\addy\SecureStrings\. Speeds up repeated loads; set $false in ephemeral environments. |
-installPath |
— | Optional | C:\addy\ |
Root path of the local addy installation. Used as the base for the keys\ and SecureStrings\ subdirectories. |
| Property | Type | Description |
|---|---|---|
.credential |
PSCredential | Ready-to-use credential object. Pass as -Credential $ds.credential or call .GetNetworkCredential().username / .password for plain strings. |
.value |
String | Plaintext value. Only populated when the Dataset uses handling = 2 (no SecureString). Use for API keys and tokens. |
.description |
String | Dataset description as entered in addy. Useful for logging and self-documenting scripts. |
.errors |
Int | 0 = success. Any positive value means at least one step failed. Always check this before using .credential or .value. |
.errormessage |
Array | Array of error message strings. Join with -join ', ' for clean log output when .errors > 0. |
.securestring |
String | AES-encrypted SecureString content as a string. Used internally to sync with addy; rarely needed in script logic. |
.key |
Byte[] | AES key bytes used for encryption and decryption. Persisted locally at the path in .keypath. |
Next step
Register for free, set up your first Dataset in addy, and start using get-addydataset in your PowerShell scripts today.