Gets or sets the key field for a NIS map entry.


string Key {get; set;}

Property value

The contents of the key field for a NIS map entry.


Each map entry consists of three primary fields: a key field, a value field, and an optional comment field.


Key throws an ArgumentException if you try to set a value that is null, empty, or greater than 1024 characters.


The following code sample illustrates using Key to make changes to an existing NIS map entry and commit the changes to Active Directory.

'Identify the zone you want to work with
set zone = cims.GetZone("")
'Create the Store object
Set store = CreateObject("Centrify.DirectControl.Nis.Store")
'Attach to the target zone
'Provide the path to the zone and user credentials (username and 'password).
store.Attach zone.ADsPath, "jae.smith", "pas$w0rd"
'Open the NIS map named "generic map"
Set map ="generic map")
'Modify the map entry fields for the “Key_Name” map record:
'entry.key = Key_Name
'entry.Value = Key_Value
'entry.comment = This is a sample generic map entry"
set entry = map.get("Key_Name")
entry.Key     = "Modified_Key"
entry.Value   = "Modified_Value"
entry.Comment = "Modified comment for the sample map entry"
'Commit the changes to Active Directory
wScript.Echo "NIS map entry has been modified."