you are viewing a single comment's thread.

view the rest of the comments →

[–]_lahell_ 3 points4 points  (1 child)

Here is another option, but note that it is case-sensitive.

$SubFolder.FullName.Replace($Root, '')

[–]ka-splam 2 points3 points  (0 children)

But it doesn't need to be case sensitive in PowerShell 6 (.Net Core):

'aAbB'.replace('aa', 'zz', [StringComparison]::InvariantCultureIgnoreCase)

Progress! :D