Comment

Gets or sets the comment field for a specific NIS map entry.

Syntax

string Comment {get; set;}

Property value

The contents of the comment field for a specific NIS map entry.

Discussion

Each map entry consists of three primary fields: a key field, a value field, and an optional comment field. To use this property, you must be able to identify the map and the entry—the specific record in the map—for which you are setting or retrieving the comment.

Exceptions

Comment throws an ArgumentException if you try to set a value greater than 2048 characters.

Example

The following code sample illustrates using Comment to change the comment field in an existing NIS map entry:

...  
'Identify the zone you want to work with  
set zone = cims.GetZone("sample.com/centrify/zones/default")  
'Create the Store object  
Set store = CreateObject("Centrify.DirectControl.Nis.Store")  
'Attach to the target zone  
'Provide the path to the zone and username and password.  
store.Attach zone.ADsPath, "jae.smith", "pas\$w0rd"  
'Open the generic map type named "Workstations IDs"  
Set map = store.open("Workstations IDs")  
'Modify the Comment field for Workstation ”128.10.12.1” map entry:  
set entry = map.get("128.10.12.1")  
entry.Comment = "San Francisco, 5th floor, Accounting Dept."  
'Commit the changes to Active Directory  
entry.Commit  
...