Check If Virtual Machine

Verb: isVirtualMachine

Available from: <Enterprise>

Checks if the environment in which the script is running is a virtual machine, returning its name if it is.

Syntax

isVirtualMachine (Boolean)=result (String)=name

Outputs

Script Designer AcceptedTypes Description
result Result Boolean True if the script is executed on a virtual machine, or False if not.
name Name Text Name of the virtual machine if the answer to Result is True.

Example

Checks if IBM RPA Studio is running on a virtual machine. A boolean is returned, indicating yes or no, and the name of the virtual machine.

defVar --name name --type String
defVar --name result --type Boolean
isVirtualMachine name=name result=result
//Displays in console if it is a VM and what is its name if the answer is True.
logMessage --message "${result}\r\n${name}" --type "Info"

See Also

  • Count Monitors
  • Get Display Devices
  • Get Screen Resolution
  • Get System Folder Path
  • Lock the Machine
  • Logoff
  • Run
  • Set Screen Resolution
  • Shutdown