You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for deserialized FileSystemInfo objects from PowerShell remoting
This change enables Terminal-Icons to work seamlessly with file and folder
objects returned from remote PowerShell sessions (Invoke-Command, Enter-PSSession).
When objects cross PowerShell remoting boundaries, they are deserialized and
their type names become "Deserialized.System.IO.DirectoryInfo" and
"Deserialized.System.IO.FileInfo". These objects behave differently from
local FileSystemInfo objects, requiring special handling.
Changes:
- Updated format.ps1xml to recognize deserialized type names in SelectionSet
- Added Test-DeserializedFileSystemInfo helper function for object detection
- Updated Resolve-Icon with safe property access patterns for all FileSystemInfo properties
- Updated Format-TerminalIcons parameter validation to accept deserialized objects
- Added comprehensive unit tests for deserialized object handling (14 new tests)
- Updated README with PowerShell remoting examples and documentation
All changes are backward compatible and preserve existing functionality for
local file system operations.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,32 @@ Get-ChildItem | Format-List
51
51
Get-ChildItem | Format-Wide
52
52
```
53
53
54
+
## PowerShell Remoting Support
55
+
56
+
Terminal-Icons now supports displaying icons for file and folder objects returned from remote PowerShell sessions. When you use `Invoke-Command` or `Enter-PSSession` to retrieve directory listings from remote machines, the objects are automatically deserialized during transmission. Terminal-Icons handles these deserialized objects seamlessly.
PowerShell remoting serializes objects when sending them across the network. FileSystemInfo objects (DirectoryInfo and FileInfo) become `Deserialized.System.IO.DirectoryInfo` and `Deserialized.System.IO.FileInfo` objects. Terminal-Icons automatically detects and handles these deserialized objects, ensuring icons display correctly regardless of whether the files are local or remote.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
0 commit comments