Add-RDMEntryPasswordListItem
Synopsis
Add an item to a Password List entry.
Syntax
__AllParameterSets
Add-RDMEntryPasswordListItem -InputObject <PSConnection> [-Name <string>] [-Username <string>]
[-Password <PSPassword>] [-Host <string>] [-Domain <string>] [-Description <string>]
[-ExpirationDate <datetime>] [-SortPriority <int>] [-CustomField <PSPasswordListCustomValue[]>]
[-User <IPSUser[]>] [-UserGroup <PSRoleInfo[]>] [-PassThru] [-Refresh] [-Set]
[-VaultMode <VaultMode>] [-ForcePromptAnswer <DialogResult[]>] [-WhatIf] [-Confirm]
[<CommonParameters>]Description
Add an item to a Password List entry, preserving the items already in the list. The entry to modify can be obtained from Get-RDMEntry. An item must have at least a username or a password. Use the Set switch to persist the change, or call Set-RDMEntry afterwards. To add an item, the user must have edit rights on the entry. OTP settings are configured separately with Set-RDMEntryOTP, using its PasswordListItemID parameter.
Examples
Example 1
PS C:\> $entry = Get-RDMEntry -Name 'MyPasswordList';
PS C:\> $field = New-RDMPasswordListItemCustomField -Name 'Environment' -Value 'Production';
PS C:\> $params = @{
Name = 'prod-db'
Username = 'sa'
Password = 'P@ssw0rd'
Host = 'db01.corp.local'
Domain = 'corp'
Description = 'Primary database account'
ExpirationDate = (Get-Date).AddMonths(6)
SortPriority = 10
User = (Get-RDMUser -Name 'jdoe')
UserGroup = (Get-RDMUserGroup -Name 'DBA')
CustomField = $field
Set = $true
}
PS C:\> $entry | Add-RDMEntryPasswordListItem @paramsAdd a fully populated item, general fields, an allowed user and user group, and a custom field, then save the entry.
Parameters
-Confirm
Prompts for confirmation before running the cmdlet.
-CustomField
Custom fields to add to the item. Build them with New-RDMPasswordListItemCustomField.
-Description
Description of the item.
-Domain
Domain of the item.
-ExpirationDate
Expiration date of the item. Setting it marks the item as expiring. Only the date is used; the time of day is ignored.
-ForcePromptAnswer
Switch to use with caution. It will automatically answer prompt asking yes/no, yes/no/cancel, or ok/cancel questions. In case of multiple prompts, multiple values can be passed to this parameter. Here are the accepted values:
Yes: Accept the prompt. Cover the OK and Automatic value.
No: Refuse the yes/no/cancel prompt. "Cancel" is the fallback option if there is no "No" option.
Cancel: Cancel the yes/no/cancel prompt. "No" is the fallback option if there is no "Cancel" option.
-Host
Host of the item.
-InputObject
Specifies the Password List entry to add the item to.
-Name
Name of the item.
-PassThru
Return the entry.
-Password
Password of the item. An item must have at least a username or a password.
-Refresh
Send a refresh notification to the Remote Desktop Manager application. Requires the Set switch to persist the change.
-Set
Save the entry in the current workspace. Without it, the item is only added to the in-memory entry object.
-SortPriority
Sort priority of the item. Items are ordered by this value in the Password List.
-User
Users allowed to see the item. Obtained from Get-RDMUser. When no user or user group is specified, the item is visible to everyone. Only supported on data sources that allow per-item roles (SQL Server).
-UserGroup
User groups allowed to see the item. Obtained from Get-RDMUserGroup. When no user or user group is specified, the item is visible to everyone. Only supported on data sources that allow per-item roles (SQL Server).
-Username
Username of the item. An item must have at least a username or a password.
-VaultMode
Vault where the command will be applied. Three choices are offered: - Default: Current vault that has been set. - User: Vault specific to the current user. - Global: Global vault of the workspace.
-WhatIf
Shows what would happen if the cmdlet were to run. The cmdlet does not run.
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection
Password List entry to add the item to. Can be obtained from Get-RDMEntry.
Notes
For more information, type "Get-Help Add-RDMEntryPasswordListItem -detailed". For technical information, type "Get-Help Add-RDMEntryPasswordListItem -full".
Last updated
Was this helpful?