<< Click to Display Table of Contents >> Navigation: OLE Automation > Application > Methods > SpaceObServer.Application.SetRootProperty |
Description
Sets a certain property for one root in the currently connected database.
Syntax
SetRootProperty(RootID : <Integer>, PropertyName : <String>, PropertyValue : <OLEVariant>);
Parameters
RootID |
The index of the root (starting with 0 to RootCount-1) |
PropertyName |
The name of the property you want to set. This parameter can be one of the following strings: "ChangeJournal": De- / Activates the NTFS Change Journals for the given root.. |
PropertyValue |
The new value to be set for this root property. Remarks: In case of "ChangeJournal" pass "true" to activate the NTFS Change Journals. Pass "false" otherwise |
Example
This is an example that shows how to add a new root and set the credentials for the root, using SetRootProperty:
PowerShell:
$SOS.AddRootToDatabase("\\Server1\Share1", $False, $False, $True, "100", $False, "~snapshot")
$RootID = $SOS.GetRootID("\\Server1\Share1")
$SOS.SetRootProperty($RootID, "ScanUser", "MyDomain\Smith")
$SOS.SetRootProperty($RootID, "ScanPassword", "myStrongPwd!1")
VBS:
SOS.AddRootToDatabase "\\Server1\Share1", False, False, True, 100, False, "~snapshot"
RootID = SOS.GetRootID("\\Server1\Share1")
SOS.SetRootProperty RootID, "ScanUser", "MyDomain\Smith"
SOS.SetRootProperty RootID, "ScanPassword", "myStrongPwd!1"
Adds the new root directory "\\Server1\Share1" to the SQL server database and sets the credentials for scanning to, user: MyDomain\Smith, password: myStrongPwd!1