Update Password List
Update an existing password list.
- Connect to the configuration web service.
- Set the unique identifier of the required password list.
- Add a new password entry to the password list.
- The item must be checked out and checked back in.
- The user must have write permissions to the item.
- The password should be set using the PasswordPlainText property. The system will automatically encrypt the password.
Code Sample
# Get the existing item.
$item = $xia.GET_Item(1234, 0);
# Check out the item.
$xia.DO_CheckOutItem($item.ItemID);
# Create a new password entry entry.
$passwordEntry = New-Object "$($xia.GetType().Namespace).PasswordListEntry";
$passwordEntry.DisplayName = "Sample Password Entry";
$passwordEntry.Description = "This is a sample password entry.";
$passwordEntry.EntryType = "WindowsLocalUser";
$passwordEntry.AccountName = "DEMO-SRV01\Administrator";
$passwordEntry.PasswordPlainText = "Passw0rd!!&";
$item.PasswordEntries.PasswordEntry += $passwordEntry;
# Update the item.
$xia.SET_Item($item);
# Check in the item back in.
$xia.DO_CheckInItem($item.ItemID);
Custom Password List Entry Types
When using custom password list entry types the entry type should be set to "Custom", and the definition identifier set to that configured for the desired custom password list entry types.
$passwordEntry.EntryType = "Custom";
$passwordEntry.DefinitionIdentifier = "3d9fa8c1-17cc-4f55-a1a1-fce065710e0d";