Next Topic

Previous Topic

Book Contents

getVariable()

Note: This command includes a 64-bit Registry Value parameter. See 64-Bit Commands.

Defines a new agent variable. When the procedure step executes, the system defines a new variable and assigns it a value based on data fetched from the managed machine's agent.

Note: See Using Variables for the types of variable values supported by the getVariable() command.

Examples

Store a registry value.

getVariable("Registry Value", "HKEY_CURRENT_USER\KaseyaAgent-HKCUTest\TestREG_SZ", "regSZ", "All Operating Systems", "Halt on Fail")

Store the contents of a file.

getVariable("File Content", "#systemdrive#\temp\degrag.txt", "defrag", "All Operating Systems", "Halt on Fail")

Store a database view.

getVariable("SQL View Data", "vMachine/IpAddress", "ipaddress", "All Operating Systems", "Halt on Fail")

Store a WMI value.

getVariable("WMI property", "root\cimv2:Win32_OperatingSystem.FreePhysicalMemory", "freememory", "All Operating Systems", "Halt on Fail")

Store the agent install drive.

getVariable("Agent Install Drive (C:\)", " ", "agentDrv", "All Operating Systems", "Halt on Fail"

Store the agent working directory path.

getVariable("Agent Working Directory Path", " ", "agentWorkDir", "All Operating Systems", "Halt on Fail"

Prompt the user to enter a value when the procedure is scheduled.

getVariable("Prompt When Procedure is Scheduled", "URL:", "site", "All Operating Systems", "Halt on Fail"