Powershell : changing Remote Desktop Home Folders.

Categories: Blog

In my last blog I posted about finding the Remote Desktop Home Folders. Best now post how to change them … Function Set-RDUserSetting { [cmdletbinding(SupportsShouldProcess)] Param( [Parameter(Position=0,Mandatory,HelpMessage=”Enter a user’s sAMAccountName”, ValueFromPipeline,ParameterSetName=”SAM”)] [ValidateNotNullorEmpty()] [Alias(“Name”)] [string]$SAMAccountname, [Parameter(ParameterSetName=”SAM”)] [string]$SearchRoot, [Parameter(Mandatory,HelpMessage=”Enter a user’s distingished name”, ValueFromPipelineByPropertyName,ParameterSetName=”DN”)] [ValidateNotNullorEmpty()] [Alias(“DN”)] [string]$DistinguishedName, [boolean]$AllowLogon, [Alias(“Profile”)] [string]$TerminalServicesProfilePath, [Alias(“HomeDirectory”)] [string]$TerminalServicesHomeDirectory, [Alias(“HomeDrive”)] [string]$TerminalServicesHomeDrive, [string]$Server, [switch]$Passthru ) […]

Powershell : Finding Remote Desktop Home Folders.

Categories: Blog

I am working on a project to migrate a Windows Cluster. I need to find any AD accounts that are pointing to the older cluster location in Remote Desktop Services Home Folder.   I have pilfered this code from the interwebs :¬†https://www.petri.com/powershell-problem-solver-active-directory-remote-desktop-settings   [code language=”powershell”] Function Get-RDUserSetting { [cmdletbinding(DefaultParameterSetName=”SAM”)] Param( [Parameter(Position=0,Mandatory,HelpMessage=”Enter a user’s sAMAccountName”, ValueFromPipeline,ParameterSetName=”SAM”)] […]