PowerShell icon indicating copy to clipboard operation
PowerShell copied to clipboard

How can I deal with GPOs that have slashes in the name?

Open born-slippy opened this issue 1 year ago • 1 comments

I started by doing a pull request having made a change to convert slashes (/ or \) to underscores as it causes Rename-Item to fail, but then realised that this would cause the restore script to break, so I closed it out and deleted my branch. Wondering if you have idea on how there might be a good way to deal with this or should we simply avoid slashes in GPO names?

Thanks!

born-slippy avatar Aug 01 '24 19:08 born-slippy

Maybe instead of renaming them, leave the files as ids, and just create pretty links using the names. Then you could sanitize the link names without changing the actual names, and they'll restore ok?

furicle avatar Aug 06 '24 19:08 furicle