← script library
Read Data from a Previous Runbook Step in PowerShell
ServerEngine PlatformAugust 17, 2026
The receiving end of the same mechanism, including the case that comes up most: splitting a comma separated list back into an array of user names or service names to loop over. Read it together with the save script — they are two halves of one idea.
powershell
# To access and load stored data from the script before
# use the $store variable like this:
#--------------------------------------------------
function Write-Log {
param($Message)
Write-Host "<WRITE-LOG = `"*$Message*`">"
}
# Example 1 (Load Text)
$example1 = $store
# Example 2 (Load Variable)
$example2 = $store
# Example 3 (Load Numeric Values)
$example3 = $store
# Example 4 (Load String List)
$userList = @()
$userList = $store -split ","
Write-Log $userList
#--------------------------------------------------
# Only use one example at a time
#--------------------------------------------------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-17Pass Data Between Runbook Steps 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.