Macro/Script/Tools

Use this forum to share with the community the template or session tool you have created.

avatar

stevenlawrence

Backlog

Execute Powershell Scripts on remote Machines with storedCredentials

I created a Powershell script Using "Powershell script (macros/script/Tool)" but I cannot find anywhere how to link my credentials to run the script. I am trying to restart a service on a remote server. I can create a Powershell to do this but I want to use the RDM to save the script. But I cannot find how to link the credentials. I appreciate any help.

307

6

avatar

ccarteralex1997

avatar

jesusgaliciaespinoza

Run a Powershell Script in multiple servers using RDM Agent

Is it possible to run a single PowerShell .ps1 script using the RDM Agent across multiple server connections? Using Script/Tools option [image]

86

2

avatar

Alexis Geller Peiro

avatar

Constantin

Powershell Script Makro to be Executed on Remote Host with Credentials from Remote host

Hi there, i've a simple Powershell Script that needs to be executed on the Remote Host, not locally. But i do not get it to work, since it's never using the correct Credentials for that Session. It seems not respecting the inheritance from the Credentials on the host? [image] I already tried with the "Use Credentials from Session, but that does not work either". [image] When i have a host with hardcoded credentials, it seems working. But not when we use the "Credential override for user specific settings on the upper folder" [image] Anyone out there with the same issue or an idea how to solve this?

80

2

avatar

Patrick Ouimet

avatar

kevinadulaney

VBScript arguments not working with variables.

I am attempting to create a vbscript that will take variables passed into the Arguments section of the Macros/Scripts/Tools window. The variable is not being passed into the script, only the $PARENT_HOST$ as literal text. The vbscript in this test scenario just takes the first argument passed and echos it to the window. [image] FQDN = Wscript.Arguments(0) WScript.Echo FQDN

560

11

avatar

Samuel Dery

avatar

markusburkhardt

PowerShell-Synchronzer - Cannot use $PASSWORD$-variable in script

Hello Fevolutions community, i hope you can help with me with my little issue. I am building a syncronizer from our network management system (NMS) to import switches as SSH-sessions into RDM. The import itselfs works without any issues. As i tried to polish the syncronizer (i don`t want to leave the password in plain text in the script) i wanted to pass through the password for the REST-user on our NMS, but its not working. I am currently using RDM 2025.3.22.0 with DVLS 2025.3.8.0 as our datasource. On the datasource i enabled the option for allowing to use the $PASSWORD$-variable in macros, scripts an so on. I didn`t find any another option in vault- orentry-settings which blocks the usage of this variable. Here are the script parts where i try to set variables for the credentials: $nmsUsername = '$USERNAME$' # working $nmsPassword = '$PASSWORD$' # not working $nmsPassword = ConvertTo-SecureString '$PASSWORD$' -AsPlainText -Force # also not working Maybe some has encountered a similar issue and can help me. Thanks in advance for the help. Greetings from Germany, Markus

131

8

avatar

Samuel Dery

avatar

nfawcett

Resolved

Keyboard Shortcut

How would I map the F4 key to execute "show environment" when I'm on a CISCO device, but when I'm on a BROCADE device I would like F4 to execute "show chassis".

165

6

avatar

Samuel Dery

avatar

mattlytle

Resolved

How do I create sub-entries from PowerShell

I was pointed at the invoke-rdmparentsession command. But I've not worked with RDM Sessions in PowerShell. If someone could show me a quick example that would be very helpful!

207

4

avatar

Jacob Lafrenière

avatar

maxime

Resolved

powershell vault/entry template

In rdm I want to create a bunch of vaults using powershell. But I have a vault template in rdm which i'd obviously want to use, is this somehow an option? I don't believe there is a pwsh command to get/set the vault templates. Or is there another command to set the vault permissions (not user or role) Below is the script i currently have, as you can see i use a entry template aswell, but i cant figure out vault templates. $datasourceID = '12345' $customerTemplateID = '12345' # Set to correct datasource. (poc) Set-RDMCurrentDataSource - ID $datasourceID # get vaultnames from csv $vaultnames = [ 'test1' , 'test2' , 'test3' ] foreach $vaultname in $vaultnames { # use vault template somehow $vault = New-RDMVault - Name $vaultname Set-RDMVault - Repository $vault # change to the new vault Set-RDMCurrentVault - Repository $vault # apply entry templateset $s = New-RDMSession - TemplateID $customerTemplateID - Type TemplateGroup Set-RDMSession $s }

263

6

avatar

Maxim Robert

avatar

wedgecon

TELNET SMTP test

I was trying to have a Post Logon action type in the command for using TELNET to test a internal SMTP server. Login to TELNET at port 25 on internal SMTP Server and execute the following commands EHLO <user@org.org> MAIL FROM: <user1@org.org> RCPT TO: <user2@org.com> DATA Subject: This is a test {ENTER} {ENTER} This tests our internal relay {ENTER} . {ENTER} QUIT I have tried putting {ENTER} after each line even though the setting is toggled to send it automatedly after each line. I set local echo to on. But it just wants to dump the commands and not wait for a response. I have tried inserting {DELAY} but that does not seem to change the behavior. This seemed like a simple test, but is proving more difficult than I thought. Is there a way to do this with?

465

2

avatar

Michel Audi

avatar

bruce_m_richardson

Resolved

Cisco Switches - the simplest macro ever

a Break key for Cisco switches. Stop a traceroute in its tracks with one click. {CTRL}^

614

5

avatar

devolutions74

avatar

aaron2

Powershell and Scripts

Hi Everyone, I'm sure this is just a lack of understanding on my part, but i'm trying to achieve the following to make life a little easier. I have written a single powershell script which I can use to connect to a tenancy's Microsoft 365 Exchange Shell (Lets call this "Connect to M365" which is a PowerShell (local) object). We store credentials in RDM and this works perfectly. What I would like to do though, is run a script against that existing connection. For instance, I have created a "PowerShell Script (Local)" which just calls "Get-OrganizationConfig" as a test. Whilst I am connected to the "Connect to M365", if I click on the "Execute Macro/Script" option from the Ribbon Bar, it will launch in a separate tab. How do I get this to launch in the "Connect to M365" Window? I hope the above makes sense, and sorry if it is a simple question. Thanks.

612

3

avatar

aaron2

avatar

Kilian

Implemented

Autologin for Office365 / Microsoft365

As an MSP, we have to login to our customers Microsoft365 quite often. The login forms of the office-portal is not really compatible with the standard tooling in RDM. You can work around that by using an "After-Open"-macro, but that is prone to breaking when the device is slow or Microsoft is being slow. I have written a custom script that can automate the login. It works by waiting for the input elements to become visible and fills them as soon as they appear. It can even handle the OTP. The script is available on my Gitlab as I might need to update it, if Microsoft decides that the current login experience is not painful enough. Link to the script on Gitlab To use the script you will need to insert it into the Custom-Script option in your website entry. You will also need to allow the password to be used in a script. A preconfigured .rdm file can also be found on gitlab. I hope it helps someone who might be stuck with a macro or even a manual login. [image]

1121

11

avatar

Cam

avatar

Griffeth Barker

Resolved

PowerShell query for filtered list of entries

Hello all, We previously used the MSSQL shared data source and in one of my scripts I would pull a filtered list of entries from RDM using this: Import-Module -Name Devolutions.PowerShell -Force $RdmList = Get-RDMSession | Where-Object { $_.ConnectionType -like "RDP*" -or $_.ConnectionType -like "SSH*" } Now we use the Devolutions Server data source and this no longer appears to work. Can someone point me in the right direction of how I would go about getting a filtered list of entries from the data source using PowerShell 7, Remote Desktop Manager 2024.1.25.0 or newer, and Devolutions Server 2024.1.11.0 or newer? Thank you!

859

8

avatar

Erica Poirier

avatar

olivierchabrolles

HyperV on localhost

Hi, I have a simple Win10 instance with HyperV installed and just one VM. Each time my PC is rebooting the VM ip address change. So I cannot reuse configured RDP session saved in my Local Data Source. I would like to add a 'Before Open' Powershell Script to get the VM IP address using for example the following command : get-vm | ?{$_.State -eq "Running"} | select -ExpandProperty networkadapters | select vmname, macaddress, switchname, ipaddresses | ft -wrap -autosize But I don't know how to store the IP address in a variable and update the Host IP address of the RDM RDP session. Can you, please point me to a solution? Best regards,

649

8

avatar

Richard Markiewicz

avatar

Bill Frisbee

Resolved

Taking Notes

Has anyone found a good way to keep notes in a vault? While the "Documentation" feature sort of works, sometimes I want a tab where I can open quickly, instantly start typing, maybe paste pictures and tables, etc. A little background. I'm a computer consultant. I keep my database secured in an Azure database. I may jump into various client networks and use a portable version. I've experimented with using Onenote and using a web page for notes but that also seems a bit clunky and authentication tends to be a pain sometimes because every time I open the note I have to jump through hoops authenticating. Put in password, enter MFA, etc. Very unpleasant. But I want to keep things integrated and mobile with RDM. Any solutions/suggestions? Thank you!

593

6

avatar

farefakesga

avatar

bradschmidt1

Using a script or automation to select an open window at login

I'm experimenting with the scripting capabilities of RDM manager and I'm hoping there's a way to do this. I want to somehow run a script so that once RDM logs into a windows box, it's selects a specific window from several already opened, types a command in that window which closes it gracefully, then runs a bat file on the desktop to restart the app. The window specific window is USUALLY the 2nd one on the taskbar, but that changes once this program is restarted, so ideally the script could directly address the window. Is this possible? Using the attached pic, I am hoping to have it select the "SendCleanQueue" window, type a "Q" in the window and enter to run it, then run the SendCleanQueue bat file on the desktop. Currently we are having to mouse over to the window, select it, etc. We have hundreds of these we often have to restart frequently, so any automation would be helpful. Thanks! [image]

673

2

avatar

Erica Poirier

avatar

Bill Frisbee

Run Powershell script against multiple Selections?

If this has been asked before, I apologize as my google fu is weak with the proper terms and I couldn't find anything. My goal is simple. I would like to select multiple entries (in Navigation or Entries tab) and run a script against them. I would like a single script instead of multiple scripts, so that the script is fed a list of servers rather than running one script multiple times. For example, checking different servers for a certain user log on, or for a certain registry entry and the output is sent to one screen (or something like out-gridview) Is this possible? Thank you!

420

4

avatar

Richard Boisvert

avatar

Bill Frisbee

Resolved

Adding tags (or IP addresses) enmasse

An odd situation I'm not sure how to address. I rely on the search feature with RDM as I have hundreds, sometimes thousands of session in different vaults. For example, I have one client with about 3K servers. I sync the servers into RDM which is great. However, there are some difference in these servers I would like to identify. I can add a tag and that helps, but when I need to add that tag to twenty servers in different OU's and locations, this becomes a very mind numbing task, especially if done one a regular basis. Is there a way to feed a list of servers to either the GUI or using powershell so that I can identify these servers and then add a specific tag? More details. Of the 3k servers, there are 40 of them that are manually provisioned. I may need to log onto these 40 servers to perform a certain task (like change a registry key) or run a script against. If I can type the tag into the search bar -poof! They are all listed where I need them, regardless of OU or location in the RDM structure. I have other tools that I can export a list of the specific servers but I don't know how to integrate the knowledge from the other tool into the RDM. In theory, I could import them into a specific folder but then I have duplicates. It would also be nice if I could use that tool to replace the session host with an IP address because one client has a global DNS infrastructure that does not work very well. Thank you.

626

8

avatar

Richard Boisvert

avatar

nelsonzhu

How Can I remove the package completed if the program got corrupted.

Recently we have clients got corrupted because a legacy version got installed and replaced the newer version, we have to remove everything for the client to work, is there a script we can leveage to uninstall and remove everything no matter the package ID or version. It will take a lot of our time if we remove the file and registry manually.

310

2

avatar

Richard Boisvert

avatar

amoa-rdm

Resolved

Obtenir la liste des membres d'une entrée

Bonjour, Il y a un script qui permet d'extraire la documentation des modules powershell, mais existe-t-il un moyen d'extraire la liste des entrées possibles ainsi que leurs membres? je ne trouve pas cette documentation. Merci Sébastien

309

3

avatar

Jeff Dagenais

avatar

stefan

TeamViewer contact list import

Hi there, I built a tool which is able to export all TeamViewer contact list connections (so called devices) including their groups inside teamviewer. It was built to be able to import them into RemoteDesktopManager so it produces a RDM compatible csv file which can be imported using default csv importer. If there are any errors or feature requests please feel free to create an issue at github because I am not monitoring this forum post. Link: https://github.com/MyUncleSam/TeamviewerExporter Releases: https://github.com/MyUncleSam/TeamviewerExporter/releases Yours Stefan Image already added

8124

14

avatar

James Lafleur

avatar

jtwilcox

Implemented

Accessing Custom Variables via Powershell Script

What's the method for accessing the list of custom variables as well as the value via powershell?

1035

8

avatar

Jonathan Lafontaine

avatar

Joffrey

RDM + Hashicorp Vault SSH CA

Hi, I you want to use the Hashicorp Vault SSH CA sign feature with your SSH session, this is my first attempt with a before Event on a SSH session: $env:VAULT_ADDR="https://your.vault.addr" $tmpkey = New-TemporaryFile Remove-ITem $tmpkey.Fullname -Force -Confirm:$false ssh-keygen.exe -q -t ed25519 -N '""' -f $tmpkey.Fullname vault write -field=signed_key ssh-demo-rdm/sign/demorole public_key="@$($tmpkey.Fullname).pub" > "$($tmpkey.Fullname)-cert.pub" $RDM.Connection.Terminal.PrivateKeyCertificateType = "File" $RDM.Connection.Terminal.PrivateKeyCertificateFileName = "$($tmpkey.Fullname)-cert.pub" $RDM.Connection.Terminal.PrivateKeyType = "File" $RDM.Connection.Terminal.PrivateKeyFileName = "$($tmpkey.Fullname)" $RDM.Connection.Terminal.PrivateKeyPromptForPassPhrase = false $RDM.save() If you know how: Use the "File -> Settings -> Password Management -> HashiCorp Vault" configuration to login to Vault Or retreive a login/password from "File -> My defaults -> ..." to make the login in my script retrieve the public key from "File -> My Defaults -> My Personal Private Key" or "My Personal Credentials" or from a Personnal Vault I appreciate help ;-) I think I will add customs fields for role or Vault addr

431

2

avatar

Richard Boisvert

avatar

krishaven

Resolved

Passwords with brackets in them don't enter correctly from Macro

I want to automate login to https://adminconsole.adobe.com/ but injecting the username and password directly doesn't trigger the change check script so clicking Continue just gets a message about needing to enter an email. I implemented it as a macro After Open: $USERNAME${TAB}{DELAY}{ENTER}{DELAY}{DELAY}{DELAY}{DELAY}$PASSWORD${TAB}{TAB}{TAB}{ENTER} Ignoring how horribly slow the website is, the password goes in wrong. What's more it's always the same wrong. The password was generated and includes brackets. It has an opening { and a closing ). The characters between those brackets don't get typed into the password box. I fear this will be a problem anywhere macros are used and passwords are allowed to contain brackets. When injected into the form, the password is correct. Unfortunately, if I do that the page reckons I haven't typed anything in and immediately tells me I'm wrong if I try to submit it either manually or automatically.

532

5

avatar

James Lafleur

avatar

tivone

PowerShell: Create SSH session

Hi I'm trying to create a bunch of SSH Shell sessions via PowerShell using the following script below (In it's basic form). I would also like to change the port from 22 (default) to a different port, how would I go about doing this. #Connect to Devolutions RDM data source $ds = Get-RDMDataSource -Name "Local Data Source" Set-RDMCurrentDataSource -DataSource $ds $session = New-RDMSession -Group "BeyondTrust\PROD\"-Host "*Hostname" -Type "SSHShell" -Name "*Servername"; Set-RDMSession -Session $session -Refresh;

807

2

avatar

Erica Poirier

1 - 25 of 148 items