This entry is a powerful "hybrid" synchronizer that lets you use PowerShell scripts to populate vaults, sync descriptions, apply templates and more. You can synchronize from sources that we don’t have a dedicated synchronizer for. It leverages proxy classes to interact with rich Remote Desktop Manager connection objects.
Provide the host, name, description and group while using the default RDP type. Alternatively, a template can be used. Here is an example:
# obtain or generate your list of sessions to create, here we assume a $data table
# has been filled by querying an external source.
Foreach($row in $data)
# obtain or generate your list of sessions to create, here we assume a $data table
# has been filled by querying an external source.
Foreach($row in $data)
# obtain or generate your list of sessions to create, here we assume a $data table
# has been filled by querying an external source.
Foreach($row in $data)
{
# create a new session, the only mandatory property is 'Name' so we require it in the Add method
$session = $RDM.Add($row.Name)
# set the other properties using $session.<property>
$session.Host = $row.Name # or $row.Host, but often times the session is named as the host
$session.Description = $row.Description
$session.Group = $row.Group # or $row.Folder, it can be multiple levels i.e. 'Folder1\Folder1a'
# please consult our online help for advanced examples
}
To set the credentials, use: $session.SetCredentials($row.Username, $row.Password, $row.Domain);
.
To only set the password, use: $session.SetPassword($row.Password);
.
The password cannot be set using $session.password
.
Here is the declaration for the ISession object that showcases its list of methods and properties you can use:
public partial interface ISession
{
string CredentialConnectionID { get; set; }
string CustomStatus { get; set; }
string Description { get; set; }
string DescriptionRtf { get; set; }
string DescriptionUrl { get; set; }
bool Encrypt { get; set; }
string Group { get; set; }
string Host { get; }
byte[] Image { get; set; }
bool IncludeInFavorite { get; set; }
ConnectionType Kind { get; set; }
string Name { get; set; }
bool OpenEmbedded { get; set; }
bool ShowInTrayIcon { get; set; }
int SortPriority { get; set; }
string Status { get; set; }
bool SetCredentials(string userName, string password, string domain);
bool SetPassword(string password);
}