Set-RDMEntryPasswordListItem
Synopsis
Modify an item of a Password List entry
Syntax
__AllParameterSets
Set-RDMEntryPasswordListItem -InputObject <PSConnection> -Item <PSPasswordListItem>
[-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
Modify an item of a Password List entry. The current values of the provided item are persisted, so changes made to the item object are saved. Any parameter that is specified overrides the corresponding field of the item. An item must still have at least a username or a password. Use the Set switch to persist the change, or call Set-RDMEntry afterwards. An entry that is not a Password List produces an error. OTP settings are configured separately with Set-RDMEntryOTP using its PasswordListItemID parameter.
Examples
Example 1
PS C:\> $entry = Get-RDMEntry -Name 'MyPasswordList';
PS C:\> $item = $entry | Get-RDMEntryPasswordListItem -Name 'prod-db';
PS C:\> $field = New-RDMPasswordListItemCustomField -Name 'Environment' -Value 'Production';
PS C:\> $params = @{
Item = $item
Name = 'prod-db-primary'
Username = 'sa'
Password = 'NewP@ss'
Host = 'db01.corp.local'
Domain = 'corp'
Description = 'Rotated primary database account'
ExpirationDate = (Get-Date).AddMonths(6)
SortPriority = 10
CustomField = $field
User = (Get-RDMUser -Name 'jdoe')
UserGroup = (Get-RDMUserGroup -Name 'DBA')
Set = $true
PassThru = $true
}
PS C:\> $entry = $entry | Set-RDMEntryPasswordListItem @params
PS C:\> $key = ConvertTo-SecureString -AsPlainText -String '12345678'
PS C:\> Set-RDMEntryOTP -InputObject $entry -PasswordListItemID $item.Id -Key $key -TimeStep 60 -SetOverride every field of the item, general fields, allowed user and user group, and a custom field, then save it and capture the returned entry with PassThru. Finally, configure the item's OTP through Set-RDMEntryOTP, targeting the item with its PasswordListItemID.
Parameters
-Confirm
Prompts for confirmation before running the cmdlet.
-CustomField
Custom fields of the item. Replaces the existing custom fields. Build them with New-RDMPasswordListItemCustomField.
-Description
New description of the item.
-Domain
New domain of the item.
-ExpirationDate
New expiration date of the item. Setting it marks the item as expiring; pass $null to clear the expiration. 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
New host of the item.
-InputObject
Specifies the Password List entry that holds the item to modify.
-Item
The item to modify. Obtained from Get-RDMEntryPasswordListItem.
-Name
New name of the item.
-PassThru
Return the entry.
-Password
New 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 change is only applied to the in-memory entry object.
-SortPriority
New 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. Replaces the existing users and user groups; pass an empty array to make the item 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. Replaces the existing users and user groups; pass an empty array to make the item visible to everyone. Only supported on data sources that allow per-item roles (SQL Server).
-Username
New 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 that holds the item to modify. Can be obtained from Get-RDMEntry.
Outputs
RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection
The entry, returned with the PassThru parameter.
Notes
For more information, type "Get-Help Set-RDMEntryPasswordListItem -detailed". For technical information, type "Get-Help Set-RDMEntryPasswordListItem -full".
Last updated
Was this helpful?