1: Split-Path
The Split-Path cmdlet returns only the specified part of a path, such as the parent folder, a subfolder, or a file name. It can also get items that are referenced by the split path and tell whether the path is relative or absolute.
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/split-path?view=powershell-6
2: Join-Path
The
Join-Path
cmdlet combines a path and child-path into a single path. The provider supplies the path delimiters.https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/join-path?view=powershell-6