Set-RDMEntryUsername
2025-01-21
Set-RDMEntryUsername
SYNOPSIS
Set the username on the specified entry.
SYNTAX
Id
Set-RDMEntryUsername [-ID] <guid> [-Username] <string> [-PassThru] [-Refresh] [-Set]
[-VaultMode <VaultMode>] [-ForcePromptAnswer <DialogResult[]>] [-WhatIf] [-Confirm]
[<CommonParameters>]
InputObject
Set-RDMEntryUsername [-InputObject] <PSConnection> [-Username] <string> [-PassThru] [-Refresh]
[-Set] [-ForcePromptAnswer <DialogResult[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
ALIASES
This cmdlet has the following aliases,
DESCRIPTION
Set the username on the specified entry. To persist the new username, the switch Set must be used. To modify the username, the user must have the appropriate rights: add for a new entry, and edit for an existing one.
EXAMPLES
EXAMPLE 1
PS C:> $entry = Get-RDMEntry -Name 'EntryA'; Set-RDMEntryUsername -InputObject $entry -UserName 'newUserName' -Set
Update the specified entry's username to 'newUserName'
EXAMPLE 2
PS C:> $securePassword = ConvertTo-SecureString -AsPlainText -String 'newPas$w0rd!'; Get-RDMEntry -Name 'UniqueName' | Set-RDMEntryDomain -Domain 'MyOtherDomain.com' -PassThru | Set-RDMEntryPassword -Password $securePassword -PassThru | Set-RDMEntryUsername -UserName 'NewUserName' -PassThru | Set-RDMEntry
Modify the domain, password and username of the entry named 'UniqueName'. The variable $securePassword is a secure string previously set. Persist the modification with the Set-RDMSession call.
PARAMETERS
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
ParameterValue: []
Aliases:
- cf
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-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 not an option No.
- Cancel: Cancel the yes/no/cancel prompt. No is the fallback option if there is not an option Cancel.
Type: System.Windows.Forms.DialogResult[]
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-ID
ID of the entry to modify. Use the VaultMode parameter to search in the User vault or the Global vault.
Type: System.Guid
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: Id
Position: 1
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-InputObject
Specifies the entry to set the username to.
Type: RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: InputObject
Position: 1
IsRequired: true
ValueFromPipeline: true
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-PassThru
Return the modified entry.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Refresh
Send refresh notification to Remote Desktop Manager application. Use Set switch to persist the modification.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Set
Save the modified entry.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Username
New username.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: 2
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-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 data source.
Type: Devolutions.RemoteDesktopManager.VaultMode
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: Id
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
ParameterValue: []
Aliases:
- wi
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
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
PSConnection object of the entry to modify the username from.
OUTPUTS
RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection
NOTES
For more information, type "Get-Help Set-RDMEntryUsername -detailed". For technical information, type "Get-Help Set-RDMEntryUsername -full".