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 FileNameFriendly property to DbaInstanceParameter for safe filenames
Fixes#30
When connecting via named pipes (e.g., .\SQLSERVER), the FullSmoName
property returns values like "NP:.$SQLSERVER" which contain colons -
invalid characters for Windows filenames. This causes Backup-DbaDbMasterKey
to create truncated filenames like "NP" instead of the intended name.
This commit adds a new FileNameFriendly property that sanitizes the
instance name for use in filenames by replacing invalid characters
(colons, backslashes, commas) with underscores.
Changes:
- Added FileNameFriendly property to DbaInstanceParameter class
- Updated existing tests to verify FileNameFriendly output
- Added comprehensive TestFileNameFriendly test covering various scenarios
The main dbatools repository can now use FileNameFriendly instead of
FullSmoName when generating backup filenames.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Chrissy LeMaire <potatoqualitee@users.noreply.github.com>
0 commit comments