Custom Reports - Group Object
Hi, when building a custom report with the Macros/Scripts/Tools, I'm trying to extract specific data out of a Group object. If I right click on the Group object, I see the XML includes my web URL, contact object, RDP session, etc.
I start my script with the following:
Foreach($connection in $Report.Connections){
if($connection.GroupDetails.GroupType -eq "Company"){
$Report.NewRow();
I'm able to grab the object correctly as I can pull the info from the main object, but I can't seem to figure out how to get the details from it for the other objects as they are all enclosed in the same <Connection></Connection> parameters as the main object. I'm trying to create report with all the details for each company.
Here's a snippet of what the XML looks like:
<?xml version="1.0"?>
<ArrayOfConnection>
<Connection>
<ConnectionType>Group</ConnectionType>
<CreatedBy>ME</CreatedBy>
<CreationDateTime>2017-10-19T20:18:03</CreationDateTime>
<CredentialConnectionID>B87B29D9-9239-4D7B-86D8-9B53DCD3BA9F</CredentialConnectionID>
<Group>ABCD</Group>
<ID>6bdc5708-6011-46cb-ba1c-ed44e69e612c</ID>
<Name>ABCD</Name>
<Stamp>a9ff2d34-b123-493b-8e5c-68fa39d9c08f</Stamp>
<UpdateDateTime>2020-08-20T18:05:37</UpdateDateTime>
<UpdatedBy>DESKTOP</UpdatedBy>
<GroupDetails>
<GroupType>Company</GroupType>
</GroupDetails>
</Connection>
<Connection>
<WebBrowserUrl>https:/abcd.com/</WebBrowserUrl>
<ConnectionSubType>Default</ConnectionSubType>
<ConnectionType>WebBrowser</ConnectionType>
<CreatedBy>ME</CreatedBy>
<CreationDateTime>2017-10-19T20:25:48</CreationDateTime>
<Description>Webclient</Description>
<Group>ABCD</Group>
<ID>2ad0232a-3ad6-4b10-be04-066e8458e976</ID>
<Name>Website</Name>
<Stamp>cd6b1691-ce4d-4d96-9639-00b255596136</Stamp>
<TemplateSourceID>00f1c015-01ca-4de0-88de-86928d488ca0</TemplateSourceID>
<UpdateDateTime>2020-08-20T18:05:37</UpdateDateTime>
<UpdatedBy>DESKTOP</UpdatedBy>
<MetaInformation>
<PasswordHistory>
<PasswordHistory>
<ModifiedBy>ME</ModifiedBy>
<ModifiedDateTime>2017-10-19T16:25:48</ModifiedDateTime>
<SafePassword>XXXXXX</SafePassword>
</PasswordHistory>
</PasswordHistory>
</MetaInformation>
<Web>
<FormId>form1</FormId>
<PasswordControlId>Login1_Password</PasswordControlId>
<SafePassword>XXXXXX</SafePassword>
<SubmitControlId>Login1_Login</SubmitControlId>
<UserName>XYZ</UserName>
<UserNameControlId>Login1_UserName</UserNameControlId>
</Web>
</Connection>
<Connection>
<Url>ServerName</Url>
<UsesHardDrives>false</UsesHardDrives>
<ConnectionType>RDPConfigured</ConnectionType>
<CreatedBy>ME</CreatedBy>
<CreationDateTime>2017-10-17T14:21:32</CreationDateTime>
<CreationSource>CSV</CreationSource>
<Description>Remote Desktop</Description>
<Group>ABCD</Group>
<ID>a647b018-05e6-43ee-8302-93c1bb50852f</ID>
<Name>Remote Desktop</Name>
<PingConnectionMethod>PortScan</PingConnectionMethod>
<PingConnectionMode>On</PingConnectionMode>
<Stamp>b5aa367d-e630-4432-b3c2-ad219ae3996f</Stamp>
<UpdateDateTime>2020-09-03T19:51:42</UpdateDateTime>
<UpdatedBy>ME</UpdatedBy>
<MetaInformation>
<CustomField1Title>License</CustomField1Title>
<CustomField1Value>A</CustomField1Value>
<CustomField2Title>Counts</CustomField2Title>
<CustomField2Value>2</CustomField2Value>
<Email>bob@gmail.com</Email>
<FirstName>Bob</FirstName>
<IP>1.2.3.4</IP>
<LastLoadFromInventoryDate>2020-07-08T14:12:57.8058456-04:00</LastLoadFromInventoryDate>
<LastName>Smith</LastName>
<Memory>0.00 GB</Memory>
<VirtualMachineType>Azure</VirtualMachineType>
</MetaInformation>
<RDP>
<Domain>MNO</Domain>
<GatewayDomain>MNO</GatewayDomain>
<GatewayHostname>MNO.com</GatewayHostname>
<GatewayProfileUsageMethod>Explicit</GatewayProfileUsageMethod>
<GatewaySelection>SpecificGateway</GatewaySelection>
<GatewayUserName>bob</GatewayUserName>
<KeyboardLayoutText>Default</KeyboardLayoutText>
<PromptCredentialOnce>true</PromptCredentialOnce>
<UserName>bob</UserName>
</RDP>
</Connection>
Importing software licenses entry from CSV
Thank you! That worked in created that licence data entry. I'm still getting an error when adding the expiration and count to their fields. Error thrown is the following:
et-RDMSessionProperty : Object of type 'System.String' cannot be converted to type 'System.Nullable`1[System.DateTime]'.
At C:\Users\Dennis\Desktop\RDM Powershell\RDM License.ps1:26 char:1
+ Set-RDMSessionProperty -ID $session.ID -Path "DataEntry" -Property "S ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-RDMSessionProperty], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,RemoteDesktopManager.PowerShellModule.SetRDMSessionPropertyCommand
Set-RDMSessionProperty : Object of type 'System.String' cannot be converted to type 'System.Int32'.
At C:\Users\Dennis\Desktop\RDM Powershell\RDM License.ps1:27 char:1
+ Set-RDMSessionProperty -ID $session.ID -Path "DataEntry" -Property "S ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-RDMSessionProperty], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,RemoteDesktopManager.PowerShellModule.SetRDMSessionPropertyCommand
Importing software licenses entry from CSV
Hello,
I'm trying to import software licenses into RDM from a CSV via the following script:
$lineno = 0
Get-Content "C:\License.csv" | ForEach-Object {
$lineno = $lineno + 1
$fields = $_.split(",")
$group = $fields[0]
$name = "Software License"
$exp = $fields[1]
$count = $fields[2]
$session = New-RDMSession -Type "DataEntry" -Name $name;
Set-RDMSession -Session $session -Refresh;
Update-RDMUI;
Set-RDMSessionProperty -ID $session.ID -Property "Group" -Value $group
Set-RDMSessionProperty -ID $session.ID -Path "DataEntry" -Property "ConnectionTypeInfos" -Value "Serial"
Update-RDMUI;
Set-RDMSessionProperty -ID $session.ID -Path "DataEntry" -Property "SoftwareExpiration" -Value $exp
Set-RDMSessionProperty -ID $session.ID -Path "DataEntry" -Property "SoftwareLicenseCount" -Value $count
Set-RDMSessionProperty -ID $session.ID -Path "DataEntry" -Property "SoftwareHidden" -Value $false
Update-RDMUI;
}
However, I keep getting the following failures:
Set-RDMSessionProperty : Object of type 'System.String' cannot be converted to type 'Devolutions.RemoteDesktopManager.Business.DataEntryConnectionTypeInfo[]'.
At C:\Users\Dennis\Desktop\RDM Powershell\RDM License.ps1:22 char:1
+ Set-RDMSessionProperty -ID $session.ID -Path "DataEntry" -Property "C ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-RDMSessionProperty], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,RemoteDesktopManager.PowerShellModule.SetRDMSessionPropertyCommand
Set-RDMSessionProperty : Object of type 'System.String' cannot be converted to type 'System.Nullable`1[System.DateTime]'.
At C:\Users\Dennis\Desktop\RDM Powershell\RDM License.ps1:26 char:1
+ Set-RDMSessionProperty -ID $session.ID -Path "DataEntry" -Property "S ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-RDMSessionProperty], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,RemoteDesktopManager.PowerShellModule.SetRDMSessionPropertyCommand
Set-RDMSessionProperty : Object of type 'System.String' cannot be converted to type 'System.Int32'.
At C:\Users\Dennis\Desktop\RDM Powershell\RDM License.ps1:27 char:1
+ Set-RDMSessionProperty -ID $session.ID -Path "DataEntry" -Property "S ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-RDMSessionProperty], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,RemoteDesktopManager.PowerShellModule.SetRDMSessionPropertyCommand
Set-RDMSessionProperty : Object of type 'System.Boolean' cannot be converted to type 'Devolutions.RemoteDesktopManager.DefaultBoolean'.
At C:\Users\Dennis\Desktop\RDM Powershell\RDM License.ps1:28 char:1
+ Set-RDMSessionProperty -ID $session.ID -Path "DataEntry" -Property "S ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-RDMSessionProperty], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,RemoteDesktopManager.PowerShellModule.SetRDMSessionPropertyCommand
Any help would be greatly appreciated. Thank you!
Custom Reports
This looks exactly to be what I'm looking for! Where can I find documentation on the various fields per entry type?
Per-user access report
Hello,
Could you please try the following report? The Permissions Report.rdm file attached to this post contains the Report entry.
Please let me know if this one works in RDM.
Best regards,
Is there any documentation on how this was generated/created?
Data Reports
Hello,
I'm trying to extract data out of the SQL table utilizing the Data Report entry. In my tables, I see the dbo.Connections table and all my entries, but the data appears hashed. Do you have any documentation on querying the database and extracting data for the data report?
Email Contacts
Hi Etienne,
Yes, I'm aware of that capability. It's just cumbersome when you're looking to maintain 100+ contacts. Was looking more for the capability of a single click on the parent node and having it aware of all the contacts below it to notify.
Custom Reports
Hi Jeff,
Thank you for the details, but this looks like exporting a report to schedule it with powershell/task scheduler based on the built-in reports. I'm looking to create my own report with a specific set of details.
Email Contacts
Hello,
When a contact is part of an entry or when a contact entry is created, I see the option to email the contact when I right click on either. Is there a way from the parent node to select all contacts and send a single email to all? Lets say there is an outage situation and I'd like to notify all users immediately. Thank you!
Custom Reports
Hello,
I thought there was a way to build a custom report? However, I can't find any documentation on it.
For example, we created a contact for each one of customers. We'd like to run a report to just obtain their email address.
Dashboard View - Custom Fields
Added
Dashboard View - Custom Fields
Under "Information" for an entry, there is a "Custom Fields" tab. That has 5 custom fields. The data displays correctly in the dashboard view but the name does not apply.
Dashboard View - Custom Fields
In the Dashboard view, when adding Custom Fields via the column chooser to be displayed, they do not take on their custom names. Instead, they show "Custom Field 1", "Custom Field 2", etc..