Resolved

Bulk edit Data Source

avatar

Hi,

Is there a possibility to turn of "drive mapping" for all RDP entries in all vaults in 1 datasource?
I am searching for a way through RDM powershell but can't find it.

Kind regards,
Yenthe

All Comments (25)

avatar

Hello,

You can modify this property using the Batch Edit feature to modify multiple entries at once.

Using the Custom PowerShell Commands, here is a sample you can use to disable the Hard drives property.

$connections.UsesHardDrives = $false;
$RDM.Save();


Let me know if that helps.

Best regards,

Érica Poirier

avatar

Hi Erica,

Is it also possible to customize over multiple vaults? when I use "multi vault search", the powershell commands are still applying to 1 vault.
Can the customized powershell also be edited that "if the hard drive is not mapped, skip this entry"?

Kind regards,
Yenthe

avatar

Hello,

Sure it can be customized and you can use the if statement like the following.

if ($connections.UsesHardDrives -eq $true)
{
$connections.UsesHardDrives = $false;
$RDM.Save();
}

Regarding the modification on multiple vaults, you will need to do it using the RDM PowerShell module instead of using the Custom PowerShell Commands.

Here is a sample script you can use to modify this option in all RDP entries through all vaults.

$vaults = Get-RDMRepository

foreach ($vault in $vaults)
{
	Set-RDMCurrentVault $vault
    $vaultName = $vault.Name
    Write-Host "Processing vault" $vaultName

	$rdps = Get-RDMSession -ErrorAction Ignore | where {$_.ConnectionType -eq "RDPConfigured"}

	foreach ($rdp in $rdps)
	{
		if ($rdp.UsesHardDrives -eq $true)
		{
			$rdp.UsesHardDrives = $false
			Set-RDMSession $rdp -Refresh
		}
	}
}


Let me know if that helps.

Best regards,

Érica Poirier

avatar

Hi Erica,

Get-RDMVault is not a viable powershell option.

forum image

Is there an up to date script?

Kind regards,
Yenthe

avatar

Hello,

Thank you for raising this problem.

Please use Get-RDMRepository instead of Get-RDMVault in the script and that should work. I have updated the script properly on my previous post.

Best regards,

Érica Poirier

avatar

Hello,

Regarding the Get-RDMVault, it seems that this alias isn't working properly until I use the Get-RDMCommand like you did. You should see it at the beginning of the list.

forum image

A ticket as been submitted to the engineering for this issue.

Best regards,

Érica Poirier

avatar

Hi Erica,

forum image

Kind regards,
Yenthe

avatar

Hi Yenthe,

This error is when there is no entries in a given vault. That won't affect the script.

You can replace the line with the following to not get the error anymore.

$rdps = Get-RDMSession -ErrorAction Ignore | where {$_.ConnectionType -eq "RDPConfigured"}


Please let me know if the entries has been properly updated.

Best regards,

Érica Poirier

avatar

Hi Erica,

I am external today and will be able to test on monday.
Can I provide you with feedback then?

Kind regards,
Yenthe

avatar

Hi Yenthe,

Thank you for your feedback.

You can answer on Monday or whenever you like when your tests are done.

Best regards,

Érica Poirier

avatar

HI Erica,

Powershell script is running for a while now, entries are around 3500 entries.

forum image

avatar

Hi Yenthe,

Thank you for your feedback.

Is the script still running?

Could you please ensure that some entries has been updated? You can open the Activity Logs report to verify the updated entries.

With a SQL data source, it's located in Administration - Reports - Activity Logs Report.

forum image

On a DVLS data source, it's located in Reports - Activity Logs on the DVLS web UI.

forum image

Best regards,

Érica Poirier

avatar

HI Erica,

I don't see any activity logs for adjusting the entries.

Kind regards,
Yenthe

avatar

Hi Yenthe,

What data source type are you connected to in RDM?

It's strange you cannot see any entry modification in the Activity Logs report.

If you want to start over, I have updated the script in this thread to display the current vault's name to provide some sort of progression.

Let me know if that helps.

Best regards,

Érica Poirier

avatar

HI Erica,

Currently the script is stuck on this.

forum image

avatar

Hello,

Thank you for your feedback.

Are you able to open the Aliplast NV vault in RDM? Do you get the Migrating data content dialog?

Then, is the script can proceed?

Best regards,

Érica Poirier

avatar

Hi Erica,

The vault opens fine, no migration data content dialog is displaying.

Kind regards,
Yenthe

avatar

Hi Yenthe,

Thank you for the information.

It could be the next vault that is causing this problem.

If this is still not working, please open a ticket at service@devolutions.net and I will send you a link book a support session. Please ensure to add a reference to this forum's thread in your message.

Best regards,

Érica Poirier

avatar

is there an option to update all data versions to 1.10 through powershell first?

avatar

Hi Yenthe,

The migration steps are completed when accessing the vault following an update of the database or following the creation of a new vault. Usually this should be transparent and should work properly.

Do you get the same behaviour in PowerShell 7?

For further investigation, could you please provide the RDM version, the RDM PowerShell module version (Get-RDMInstance cmdlet) and the data source type you are connected to?

Best regards,

Érica Poirier

avatar

Morning Erica,

How can I open Powershell 7 with the RDM CmdLet? It only opens 5.1

forum image

Kind regards,
Yenthe

avatar

Hi Erica,

I managed to ran the script through Powershell 7. This seems to be working fine.
The vaults are all being updated.

Only error I see is this sometimes, but the script keeps running

forum image

Kind regards,
Yenthe

avatar

Hi Yenthe,

That's a good news you were able to run the script in PowerShell 7.

For safety measures, we strongly recommend to do a full database backup prior to execute any of the following operations.

Per this error, it seems that some entries are located in virtual folders. Could you please verify in one the vaults that you got these errors if there are one or more virtual folders? You can verify this in Help - Diagnostic - Data Source - Data Source Diagnostic.

forum image

If there are some Duplicate Folders in this report, then click on the Remove Duplicates button.

forum image

The following script will convert the virtual folders that could exist in all vaults.
https://github.com/Devolutions/RDMSamples-ps/blob/main/module/entries/MassEdits/ConvertVirtualFolders.ps1

Let me know if that helps.

Best regards,

Érica Poirier

avatar

Hi Erica,

Thank you for the assistance, the errors were minimal so I am going to manually adjust them.

Kind regards,
Yenthe

avatar

Hi Yenthe,

Thank you for your feedback and glad you were able to fix these virtual folders.

Best regards,

Érica Poirier