Showing posts with label Remote Desktop Broker. Show all posts
Showing posts with label Remote Desktop Broker. Show all posts

Friday, 30 July 2021

Compacting user profile disks (UPD) on a RDS Broker / host setup

 UPD by default can grow up to 20GB,  this will happen automatically over time as the users add more data and generates more trash data.

This will never clean down though and can lead to the system looking larger then it actually is.

This is a good script to run to clean down the white space within the UPD


#FILE
$VHDXPaths = @(
    '\\SERVER\FSLogix',
    '\\SERVER\ProfileDisks'
)

$VHDXExclusions = @(
    'UVHD-template.vhdx'
)

Foreach ($Path in $VHDXPaths){
    $AllUPDs = Get-ChildItem $Path -Recurse -Filter *.vhdx | Where-Object {$VHDXExclusions -NotContains $_.name} | Select-Object -ExpandProperty fullname

    foreach ($UPD in $AllUPDs){
        NEW-ITEM -Name compact.txt -ItemType file -force | OUT-NULL
        ADD-CONTENT -Path compact.txt "select vdisk file= $UPD"
        ADD-CONTENT -Path compact.txt "compact vdisk"
        DISKPART /S compact.TXT
    }
}

#EOF


PowerShell/Compact-UPDs.ps1 at master · andy2002a/PowerShell · GitHub

Monday, 7 December 2020

RDP File settings from a RDS Broker registry

If you have lost the RPD file for one of you collections in your Remote Desktop Broker,  the quick fix is to log in the brokers website and download the RDP file.

But if you do not have access to that collection you can also pull it from Registry and save it in the black text file called <SOMETHING>.rdp

You are looking for Key called ' RDPFileContents'  and it will be located in a subfolder in the following location

HKEY_LOCAL_MACHINE > SOFTWARE >Microsoft > Windows NT > CurrentVersion >Terminal Server > CentralPublishedResources >PublishedFarms

 They are some more subfolders to drill down in to but it depends on what you have called your collections.