Four worked examples of the store variable that carries a value from one runbook script to the next: plain text, a variable, a number and a list joined into a string. Half of what makes runbooks more than a list of scripts, and the reason so many scripts in this library end by filling it in.
powershell
# You can save data to the variable $store
# To use data on the next script using Runbooks
#--------------------------------------------------
function Write-Log {
param($Message)
Write-Host "<WRITE-LOG = `"*$Message*`">"
}
# Example 1 (Save Text)
$store = "This text was saved"
# Example 2 (Save Variable)
$message = "This variable was saved"
$store = $message
# Example 3 (Save Numeric Values)
$store = 1337
# Example 4 (Save SringList or Aarray as String)
$store = "c.orlando, m.muster"
Write-Log "Save: $store"
#--------------------------------------------------
# Check LoadData next for loading usage
#--------------------------------------------------Run it across your fleet
This script runs as-is on a single host. Paste it into ServerEngine to schedule it, run it on a whole server group in parallel, and keep the credentials out of the file — see the scripts documentation and the credential store.
More in ServerEngine Platform
Write to the ServerEngine Run Log from PowerShell
2026-08-17Read Data from a Previous Runbook Step in PowerShell
2026-08-17Pass Parameters into a PowerShell Script from an API
2026-08-17Reboot a Server and Resume the Runbook
2026-08-17Configure WinRM over HTTPS with a Self-Signed Certificate
2026-08-17Configure WinRM over HTTPS with a Domain Certificate
2026-08-17Ready when you are.
Try ServerEngine free for 7 days.