OLE Automation

Note

This feature is only available in the “Enterprise Edition” of SpaceObServer!

The OLE Automation interface enables you to automate common SpaceObServer tasks by using your own scripts or programs.

You can export results of scans or even navigate through a scanned directory tree to export only certain directory information. The directory tree can be filtered by certain criteria before exporting or navigating the directory branch. New scans can be scheduled or existing can be removed from the connected database.

This section will show you all the possibilities of the SpaceObServer OLE Automation interface and provides useful example code. Please refer to the properties and methods of “SpaceObServer.Application” to get a detailed description of all the functionalities.

Code Examples

PowerShell:

# Create SpaceObServer OLE Automation object
$SOS = New-Object -com SpaceObServer.Application

# Set the root directory
$SOS.ROOTDirectory = "\\Server1\Share1\"

# Export the root directory to Excel file
$SOS.ExcelExport("C:\Temp\SOSexport.xls", "SpaceObServer %DATE%")

VBS:

' Create SpaceObServer OLE Automation object
Set SOS = CreateObject("SpaceObServer.Application")

' Set the root directory
SOS.ROOTDirectory = "\\Server1\Share1\"

' Export the root directory to Excel file
SOS.ExcelExport "C:\Temp\SOSexport.xls", "SpaceObServer %DATE%"

Sample Scripts

Please find more code samples here.