Accessing Redirected Local Drives via RDP on Windows Server Core: CLI Methods and Troubleshooting


2 views

When connecting to Windows Server Core via Remote Desktop Protocol (RDP), the standard drive redirection feature presents unique challenges. Unlike full GUI installations where redirected drives appear in File Explorer as E on LOCALBOX, Server Core's minimal interface requires command-line alternatives.

Redirected drives are actually mounted under a special namespace. To list all available drives including redirected ones:

wmic logicaldisk get name,description

Alternatively, use PowerShell for more detailed information:

Get-PSDrive -PSProvider FileSystem | Format-Table Name,Root,Description

The redirected drives typically appear under the tsclient namespace. For example:

dir \\tsclient\C

If you need to work with these files extensively, you might map them as a network drive:

net use R: \\tsclient\C /persistent:yes

Problem: "System Folder" error when accessing through third-party tools
Solution: The tools may lack proper permissions. Try accessing through cmd/PowerShell first.

Problem: Drives not showing in tsclient
Verification: First confirm redirection is enabled in your RDP client settings and check Group Policy settings on both client and server:

gpresult /h rdp_report.html

Example of copying files from a redirected drive:

$source = "\\tsclient\C\Temp\file.txt"
$dest = "C:\ServerFiles\"
Copy-Item -Path $source -Destination $dest -Force

For bulk operations, you might create a simple transfer script:

$files = Get-ChildItem -Path "\\tsclient\C\ProjectFiles\*.csv"
foreach ($file in $files) {
    Copy-Item -Path $file.FullName -Destination "D:\Imports\"
}

Remember that:

  • Drive redirection can be disabled via Group Policy (Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Device and Resource Redirection)
  • Audit access to sensitive client drives by checking Event ID 1149 in Security logs
  • Consider using PowerShell remoting as a more secure alternative for file transfers

Windows Server Core installations present unique challenges when you need to access local drives through Remote Desktop Protocol (RDP). While full GUI versions display redirected drives in Explorer as "E on LOCALBOX", Server Core requires command-line alternatives.

The redirected drives actually mount under a special namespace path. Try this command to list available drives:

dir \\tsclient\

This will display all drives shared from your local machine. For example:

 Volume in drive \\tsclient\C is OS
 Volume Serial Number is 1234-5678

 Directory of \\tsclient\C

01/01/2023  12:00 PM    <DIR>          Windows
01/01/2023  12:00 PM    <DIR>          Program Files

Here are some common operations you can perform:

:: Copy file from local C drive to server
copy "\\tsclient\C\Temp\file.txt" "C:\ServerFiles\"

:: Copy directory from server to local D drive
xcopy "C:\Logs\" "\\tsclient\D\Backups\" /E /H /C /I

:: Check disk space on local drive
fsutil volume diskfree \\tsclient\C

If you encounter "System Folder" errors in third-party tools, try these solutions:

:: Enable detailed error messages
cmd /k chcp 65001

:: Check RDP drive redirection settings
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDisableCdm

If the value is 1, redirecting is disabled. Enable it with:

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDisableCdm /t REG_DWORD /d 0 /f

For more advanced operations, PowerShell provides better tools:

# List all available TSClient drives
Get-PSDrive -PSProvider FileSystem | Where-Object {$_.Root -like "*tsclient*"}

# Mount specific local drive as network drive
New-PSDrive -Name "LocalD" -PSProvider FileSystem -Root "\\tsclient\D" -Persist

# Recursive file copy with progress
Copy-Item -Path "\\tsclient\C\Projects\" -Destination "C:\RemoteProjects\" -Recurse -Verbose

Create a batch script to simplify frequent operations:

@echo off
:init
setlocal EnableDelayedExpansion

if not exist "\\tsclient\C" (
    echo Local drive C not available
    exit /b 1
)

:: Map to drive letter (optional)
subst X: "\\tsclient\C\WorkFiles"

:: Your operations here
xcopy "X:\" "C:\Backups\%DATE%\" /E /H /C /I

:: Cleanup
subst X: /d