Online Help > PowerShell Scripting > PowerShell Samples

Powershell Sample - Creating an entry

Description

 

This sample creates an entry.

 

Sample

 

$computerName = "wind10";

$theusername = "david";

$thedomain = "windjammer";

$thepassword = "123456";

$session = New-RDMSession -Host $computerName -Type "RDPConfigured" -Name $computerName;

Set-RDMSession -Session $session -Refresh;

Update-RDMUI;

Set-RDMSessionUsername -ID $session.ID $theusername;

Set-RDMSessionDomain -ID $session.ID $thedomain;

$pass = ConvertTo-SecureString $thepassword -asplaintext -force;

Set-RDMSessionPassword -ID $session.ID -Password $pass;

 

Notes

 

The Update-RMUI call is to allow the entry to be physically saved and available for the rest of the script.  It may not be necessary for a types of data sources and our objective is to make it unnecessary for this scenario.

 

cmdlets reference