Files
claudetools/.claude/memory/feedback-rmm-unc-path-encoding.md
Mike Swanson f8ed03c75a sync: auto-sync from GURU-5070 at 2026-06-02 07:25:49
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-02 07:25:49
2026-06-02 07:25:55 -07:00

1010 B

name, description, metadata
name description metadata
feedback-rmm-unc-path-encoding RMM PowerShell UNC paths via user_session context lose one backslash when using string literals — must build with [char]92
type
feedback

Never use "\\CS-SERVER\..." string literals in PowerShell scripts dispatched via GuruRMM user_session context. The backslash gets halved somewhere in the encoding pipeline, producing \CS-SERVER\... (a local path) instead of the UNC \\CS-SERVER\....

Why: The user_session execution wrapper appears to process escape sequences in the script text differently than system context, stripping one backslash from \\.

How to apply: Always build UNC paths explicitly when using user_session:

$bs = [char]92
$base = "${bs}${bs}CS-SERVER${bs}homes${bs}Username"

This constructs \\CS-SERVER\homes\Username correctly regardless of context.

The system context (offline hive reg query) showed correct \\CS-SERVER output, so the issue is specific to user_session.