PowerShell Module
It does appear that the new module does not work if the datasource asks for a password(?)
PS C:\Program Files (x86)\Devolutions\Remote Desktop Manager> Update-RDMUI
NotImplementedException - The method or operation is not implemented.
at RemoteDesktopManager.UIService.ShowSharePasswordPrompt()
at Devolutions.RemoteDesktopManager.Services.BusinessSecurityProviderService.ConfigureClientSharedPasswordProvider(ISecurityProvider provider, IConnectionDataSource dataSource, Object configuration, Boolean persist)
at Devolutions.RemoteDesktopManager.Business.SharedPasswordSecurityProvider.Initialize(IConnectionDataSource dataSource, String configuration)
at Devolutions.RemoteDesktopManager.Managers.ConnectionManager.LoadConnectionsFromDataSource(ConnectionEngine engine, Boolean hasChanged)
at Devolutions.RemoteDesktopManager.Managers.ConnectionManager.LoadConnections(BaseConnectionDataSource dataSource)
NotImplementedException - The method or operation is not implemented.
at RemoteDesktopManager.UIService.ShowSharePasswordPrompt()
at Devolutions.RemoteDesktopManager.Services.BusinessSecurityProviderService.ConfigureClientSharedPasswordProvider(ISecurityProvider provider, IConnectionDataSource dataSource, Object configuration, Boolean persist)
at Devolutions.RemoteDesktopManager.Business.SharedPasswordSecurityProvider.Initialize(IConnectionDataSource dataSource, String configuration)
at Devolutions.RemoteDesktopManager.Managers.ConnectionManager.LoadConnectionsFromDataSource(ConnectionEngine engine, Boolean hasChanged)
at Devolutions.RemoteDesktopManager.Managers.ConnectionManager.LoadConnections(BaseConnectionDataSource dataSource)PowerShell Module
You should update the PowerShell help page to reference this. Having a check in RDM when "Load RDM CmdLet" is checked to see if the module actually exists, and notifying the user to install it if it isn't, would also be good.
Improved VMware synchronizer with PowerShell
Those errors are expected and unavoidable. It is documented in this comment:
# find existing session
# XXX: Get-RMDSession uses ValidateSet to check if the session is present in the group.
# this causes a non-suppressable error message and does not assign to $s.
# because of this, we have to set $s to null and even if it is working OK we will get spammed with ParameterArgumentValidationErrors.But more to the point, I just realized I calculated the folder count backwards. If you only care about the final 2 path elements (session and folder), it is this simple:
$g = $_.Parent.NameIf you do want to explicitly check for and only utilize VMs that are nested 5 folders or deeper, I have updated my post above with a working example.
Regards.
Improved VMware synchronizer with PowerShell
Based on your initial requirements it should work. However, based on your last reply there is only 1 subfolder you are wanting to skip and not 2. If that is the case then you should change the line $c = 5 to 4. Unfortunately since I don't have your environment I can't test it, and you didn't provide the error you were receiving... :)
As I mentioned the patch will skip 5 path elements. The root of the environment is always vm, the next level is the datacenter object (i.e. every vCenter environment you have configured at each site), the next is the cluster, and all the levels after that are the folders set up in your environment. Setting $c to 4 will skip one less path element, so in your example
vm/Datacenters/<cluster>/<folder1>/Customer Name\ .... location of the vm's.......
the first four will be ignored, leaving
Customer Name\ .... location of the vm's.......
Haven't looked at it for a while so it's actually Datacenters/<cluster>/vm/<folder1>/<folder2>/...
Regards.
Improved VMware synchronizer with PowerShell
or was it regarding the script above?
Were that the case, replace $g with:
$folder = $_.Folder
$cur = New-Object System.Collections.ArrayList
while ($folder -ne $null) {
$cur.Insert(0, $folder.Name)
if ($folder.ParentFolder -ne $null) {
$folder = $folder.ParentFolder
} else {
$folder = $folder.Parent
}
}
# if VM is not 5 or more folders deep, ignore it and go to next
if ($cur.Count -lt 5) { return }
# ignore 5 path elements: vm/Datacenters/<cluster>/<folder1>/<folder2>
$g = $cur.GetRange(5, $cur.Count - 5) -join '\'Setting for "Default" option in Website entry?
Thank you very much!
Improved VMware synchronizer with PowerShell
I found that the built-in vSphere (VMware) synchronizer was not meeting our needs, in particular that you can only choose VMRC or RDP. We use both, with most of our Windows servers utilizing RDP and others requiring VMRC.
This script requires:
VMware PowerCLI
A Credential entry for your VMware environment
Manually running the script when you want to update OR schedule the script to run, load the RDM cmdlet, and connect to the database beforehand
Write-Host 'Loading PowerCLI...'
Import-Module VMware.PowerCLI
$id = @{ID = 'your-guid-here-please'} #ID for vSphere local admin credential object
Write-Host 'Connecting to vSphere...'
$vsphere = 'your.vsphere.server.com'
$srv = Connect-VIServer -Server $vsphere -Credential (New-Object System.Management.Automation.PSCredential((Get-RDMSessionUserName @id), (Get-RDMSessionPassword @id)))
Get-VM | % {
# calculate expected group path based on VM folder
$g = $(
$folder = $_.Folder
$path = $null
while ($folder -ne $null) {
# root folder is 'vm', ignore it
if ($folder.Name -cne 'vm') {
if ($path -eq $null) {
$path = $folder.Name
} else {
$path = '{0}\{1}' -f $folder.Name, $path
}
}
if ($folder.ParentFolder -ne $null) {
$folder = $folder.ParentFolder
} else {
$folder = $folder.Parent
}
}
# you can change what toplevel group to put the VMs in below
'VMware\{0}' -f $path
)
# calculate expected session type based on VM guest type ID
if ($_.GuestId -match '^win(dows|XP|Net|Longhorn)') {
$ct = 'RDPConfigured'
$h = $_.Name
} else {
$ct = 'VMRC'
$h = $vsphere
}
# find existing session
# XXX: Get-RMDSession uses ValidateSet to check if the session is present in the group.
# this causes a non-suppressable error message and does not assign to $s.
# because of this, we have to set $s to null and even if it is working OK we will get spammed with ParameterArgumentValidationErrors.
$s = $null
$s = Get-RDMSession -Name $_.Name -GroupName $g -CaseSensitive -ErrorAction SilentlyContinue
if ($s) {
if ($s.ConnectionType.ToString() -ne $ct) {
# delete session of wrong type
Remove-RDMSession -ID $s.ID
$s = $null
}
}
# create new session if it does not exist
if (-not $s) {
# create folders that do not exist
# XXX: probably breaks on any vm folders with backslashes in the name, if that's possible
$split = $g.Split('\')
$cur = New-Object System.Collections.ArrayList
while ($cur.Count -lt $split.Count) {
$cur.Add($split[$cur.Count]) | Out-Null
$curstr = $cur -join '\'
if (-not (Get-RDMSession -Name $cur[-1] -GroupName $curstr -ErrorAction SilentlyContinue)) {
Set-RDMSessionCredentials -CredentialsType Inherited -PSConnection (New-RDMSession -Name $cur[-1] -Group $curstr -Type Group) -SetSession
}
}
$s = New-RDMSession -Name $_.Name -Host $h -Group $g -Type $ct
Set-RDMSessionCredentials -PSConnection $s -CredentialsType Inherited
$s.OpenEmbedded = $true
$s.AuthentificationLevel = 'ConnectDontWarnMe'
if ($ct -eq 'VMRC') {
$s.VMRC.VMWareConsole = 'VMWareVMRC8'
}
}
# things to update regardless of if the session was just created or if it already existed
$s.Description = $_.Notes
if ($ct -eq 'VMRC') {
$s.VMRC.VMid = $_.Id.Remove(0, 15)
}
Set-RDMSession -Session $s
# push it down the pipe to the GridView
$s
} | Out-GridView
Update-RDMUI
Disconnect-VIServer $srv -Force -Confirm:$false
PauseSession is attached.
Regards.
Setting for "Default" option in Website entry?
Thank you for the fast response.
We will hopefully soon be receiving our license for RDM, and are very happy with the functionality of the software.
Regards.
Setting for "Default" option in Website entry?
Is there a configuration option to change what browser is used for the "Default" option in Website entries under More Settings? I was not able to find it.
Regards.