Powershell Session Import
Hello,
1 - 13.6.5.0
2 - Yes (I'm currently the only one testing the new version, so it's just the my client on a test database)
3 - SQL Server
4 - ------
Best regards,
Powershell Session Import
Hello Erica,
Script is working fine now, except one "beauty" problem... I set the current Datasource at the beginning with "Set-RDMCurrentDataSource -ID <ID>".
If i don't do that, the script is running slow and will exit at some point, with it everything is fine but i get the following console output every time (cannot be surpressed with | out-null, etc.)
Devolutions.RemoteDesktopManager.Business.Exceptions.RootException: Duplicate root creation detected!
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.DetectDuplicateRoots(Connection root, IDbTransaction dbTransaction, String repositoryId, Boolean update)
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.c0cc7f9d508f1ec50318abae3c37f1fc0(Connection cbdc2310dae04de179a24c6e62a14e6e8, IDbTransaction c5a0ca8eaa594113c2f0b3cfe13dedff9, Nullable`1 c6c7922f70bc4ad6a683a9f6baa3f4b7d, Boolean c6d1e4c3cd1ebd972b34fc4a6a144a4e1)
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.SaveConnections(IEnumerable`1 connections, IDbTransaction dbTransaction, ISecurityProvider provider, Nullable`1 repositoryID)
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.SaveConnection(Connection connection)
Is there anyway to avoid this output?
Thanks in advance.
Powershell Session Import
Hy,
i'm just updating our session import script, as it was written while using the powershell CMD-lets a few years ago and now we are going to a newer version and want to use the powershell module...
Before i could just set the group of a session with$session.Group = "abc\abc2\abc3" and confirm it with Set-RDMSession $session. Looks like that's not working anymore, so i tried it with $session = New-RDMSession -Type "Group" -Name "abc\abc2\abc3". But it looks like that i need to add a new group (and confirm it with Set-RDMsession) for every subfolder, before i can go to the next one? Is that right? Is there no way to add a session straight into a new folder structure with for example 3 sub directories?
And how can i add a subsession for a client? Before it was with $session.children. I can't find a new possibilty for this, as $session.subconnections is a read-only property.
Thanks for your help,
Best regards
Powershell Module
Hello Erica,
thanks for your help. Looks like it's working now. I tried a few installations and it's looking fine now.
I will now use the unblock-file command in the initial script (runs with administrator privileges) after the copy process, just to be safe. Users have Read&execute, List folder contents and Read permissions.
Best regards
Powershell Module
Hey,
thanks for the tip. After the unblock-file command it worked with the local administrator, but still not with the non-administrator privileged domain user.
Is it not possible for a non-administrator user to get the powershell module working?
Best regards
Powershell Module
Hi,
i tried this before, but i get the following error message:
Import-Module : Die Datei oder Assembly "file:///C:\Program Files
(x86)\RDManager\RemoteDesktopManager.PowerShellModule.dll" oder eine Abhängigkeit davon wurde nicht gefunden. Der
Vorgang wird nicht unterstützt. (Ausnahme von HRESULT: 0x80131515)
Translated: File or assembly (filepath) or a dependence of it could not be found. The process is not supported.
Powershell Module
Hello there,
as there's not too much action in the german support forum, i will try it here...
I am testing version 13.6.5.0 in our environment. We deploy the program files / config from the downloadable .zip-file. Everything works fine, but i'm struggling to get the Powershell module working.
If i am right, the module will be installed when i run the .exe to install RDM. But how can i do that manually if i deploy the files from the .zip-file?
I tried "Install-Module -name "C:\Program Files(x86)\RDManager\RemoteDesktopManager.PowershellModule.dll", but that needs a nuget repositry and that download is blocked at our gateway.
Is there any other way to get this running?
Thanks in advance,
Greg
Adding SubConnections at Import
Hey,
thanks. Looks like it was our error at the routine for loading the CmdLet. At the moment it's working fine.
Thanks for your help, much appreciated!
Best regards
Adding SubConnections at Import
Edit:
looks like it is working if we unblock the files first via: gci 'c:\Program Files (x86)\Devolutions\Remote Desktop Manager' | Unblock-File
But we get the following message at the first start (see attachment):
Do you know this warning?
Best regards,
Gregor
EDIT2:
Looks like it's just in an external Powershell, it can't load/find the registered the .dll. If i start it in RDM with the option "Load RDM CmdLet" it's working fine.
I could do it in this way too, is there a way to avoid people to edit the embedded script but they can still use it?
Adding SubConnections at Import
Hi,
it's working now, thank you!
Just another question. We will deploy this powershell import script to our users, so they can easily import their test environments.
In that case we need to register the RemoteDesktopManager.PowerShell.dll first. We did that in previous versions via the installutil.exe without problems.
As i did it manually for test now, i needed to unblock the .dll in the installation folder first. Do we need to do this on every client now?
Can you tell me (maybe a code example) what is needed to get the cmdlets to work properly?
Best regards,
Gregor
Adding SubConnections at Import
Hi,
we are using SQL Database. Currently based on SQL Server 2008 R2. In the future it will be SQL Server 2014.
Best regards
Adding SubConnections at Import
Hey,
we are using the Enterprise Edition Version 11.1.0.0.
Best regards,
Gregor
Adding SubConnections at Import
Good Morning,
thanks for your help. Unfortunately i can't get your example script to work (see attachment)
Best regards,
Gregor
Adding SubConnections at Import
Hey,
im currently expanding my selfmade import script for powershell and wanted to add subconnections. But i can't find out how to do it...
Currently im adding the main session like this:
$session = New-RDM-Session -Name $Name -Host $MachineName -Kind "RDPConfigured"
$session.Group = $Group
Set-RDM-Session $session -NoRefresh
$sessioncheck = Get-RDM-Session
If ($sessioncheck -match $session.id)
{
Set-RDM-Property -ID $session.ID -Path "MetaInformation" -Property "OS" -Value $OS -NoRefresh
Set-RDM-Domain -ID $session.ID -Domain $Domain -NoRefresh
Set-RDM-UserName -ID $session.ID -UserName $UserName
Set-RDM-Property -ID $session.ID -Property "ImageMD5" -Value $ImageMD5
Set-RDM-Property -ID $session.ID -Property "ImageName" -Value $ImageName
}
Now.. I want a Subconnection added to this entry. In this subject it would be the DELL iDRAC from the Server.
Can you help me out?
PS:
Is there a way to add the iDRAC Entry straight via the CMDlet? There is no choice for "iDRAC" in the -Kind parameter? As a workaround i am doing it via a template where i set the iDRAC session and use -Kind "undefined". Is there an easier way?
Thank you in advance.
Gregor
Going from RDM 8.4.6 to RDM 9.0
push!
the same question is in my head at the moment, so how does it work?
thanks
Set-RDM-Datasource;Xml data source initialization
Hey..
Wow, it's much faster now, the only thing that doesn't work you wrote:
$session.MetaInformation.OS = $OS
i did it like the examples below with set property -norefresh, and then it worked.
but thank you for your help, amazing support :)
Set-RDM-Datasource;Xml data source initialization
Hello, nice to hear that it is in the next release!
What do you mean with that:
"What is does is if ever you open an Xml data source in PowerShell for the very first time then it simply chooses the default master key without prompting the user (no UI)."
I can't see what you mean, sorry.
BTW, when i import a few sessions (around 30).
I first read the Hostname and so on from a .csv File and then create a new session and set the properties..
Until all of them are imported it needs a few minutes (~5min)
If i import a .rdm-File through "file - import - import session list" it only needs a few seconds.
Is there something i do wrong?
Code:
$session = New-RDM-Session -Name $Name -Host $MachineName -Kind "RDPConfigured"
Set-RDM-Session $session
$list = $session
Set-RDM-Property -ID $list.ID -Property "Group" -Value $Group
Set-RDM-Property -ID $list.ID -Path "MetaInformation" -Property "OS" -Value $OS
Set-RDM-Property -ID $list.ID -Path "RDP" -Property "Domain" -Value $Domain
Set-RDM-Property -ID $list.ID -Path "RDP" -Property "UserName" -Value $UserName
Set-RDM-Property -ID $list.ID -Property "Url" -Value $MachineName
Set-RDM-Property -ID $list.ID -Property "Domain" -Value $Domain
Set-RDM-Property -ID $list.ID -Property "UserName" -Value $UserName
Thanks for your support :)
Set-RDM-Datasource;Xml data source initialization
The problem is, i want to provide that script to several users.
They only choose the clients and servers to import at the GUI and the script will do that for them.
some of them use the local data source, so deleting it is unfortunately no solution.
And to tell everyone of them to initialize it once, before they can use the script, is not the way i prefer tbh..
Is there no other way to make it invisible or something else?
thanks..
Set-RDM-Datasource;Xml data source initialization
Hi.
I got a problem while importing some sessions into the RDM via Powershell.
I have 2 Datasources:
"Local Data Source" and "RDMconnects"
Before i can import the sessions, i need to change the Datasource to "RDMconnects" because the
Local Data Source is always current.
For that i will use: Set-RDM-DataSource -ID
So, now the problem.
Everytime i run the script i get a PopUp "Xml data source initialization - Configure your security settings" >> see attachment..
I want to use that script in a GUI and want to get rid of this, so just set the RDMconnects data source.
Is there a way to avoid that PopUp?
Thank you!