Batch powershell edit - remove Drive redirect

Batch powershell edit - remove Drive redirect

avatar

Hi

I have tried to change all my RDP sessions to, not redirect Hard drives, I have tried the lines down under, with = 0, $false, $null and $off and I get Success on all connections, but the setting is still present, how do I disable this setting?

$connection.RDP.RedirectedDrives= $null;
$RDM.Save();

Regards Lars

Remote Desktop Manager connected with Devolutions Server running newest versions.

------------------------Signature------------------------

Sorry if any of above sounds harsh or provoking, it is NOT meant as such, but I have Asperger's and don't always know.
My intentions is always to be friendly.

-------------------------------------------------------------

All Comments (5)

avatar

Hello,

This setting is managed this way :

$connection.UsesHardDrives = $False;
$RDM.Save();

The Redirected Drives is a sub-setting of the UsesHardDrives.

I hope this helps!
Best regards,

Alex Belisle

avatar

Ahh, thank you.

Have I misunderstood something, or is this an exception, that you should be able to generate the property from the XML copy:

<?xml version="1.0"?>
<ArrayOfConnection>
  <Connection>
    <RDP>
      <RedirectedDrives>
        <string>Local Disk (C:)</string>
      </RedirectedDrives>
    </RDP>
  </Connection>
</ArrayOfConnection>

Regards

Remote Desktop Manager connected with Devolutions Server running newest versions.

------------------------Signature------------------------

Sorry if any of above sounds harsh or provoking, it is NOT meant as such, but I have Asperger's and don't always know.
My intentions is always to be friendly.

-------------------------------------------------------------

avatar

Hello,

Your technique is impeccable, it's juste that the UsesHardDrives is the value for the check box, and the RedirectedDrives is the option for selecting which drives you wish tio have redirected.
RDM will validate parameter from the UI, Powershell will bypass them validations, so we have to be a little more carefull in some cases.

I hope this helps.
Best regards,

Alex Belisle

avatar

Ahh, yes, now I know why I got confused.
It's because it's the default that DiskDrives are redirected an I looked at a connection where it was selected, thinking it would give a line.

I have just looked at on of the connections where I disabled the the redirect, and now I can see xml tag: UsesHardDrives.

Thanks!

Remote Desktop Manager connected with Devolutions Server running newest versions.

------------------------Signature------------------------

Sorry if any of above sounds harsh or provoking, it is NOT meant as such, but I have Asperger's and don't always know.
My intentions is always to be friendly.

-------------------------------------------------------------

avatar

Hello,

You're welcome, I feel a little bad because I haven't mentioned that the default values are not included in the XML...

Anyway,. glad this however shed some light on this.

Have a great one!
Best regards,

Alex Belisle

Ends in 5 days