I have a powershell script that has an input parameter of $OutputFolder
An example value of $OutputFolder is '\\\\SHD-D-EDIAPP01\\H2FileRepository\\Dev\\CommonDev\\reports\\HRF605\\'
This is fine for use in JSON to pass to a web service call.
I'm keen to output the folder path in a write-host command that displays the value but with the \\ replaced by \
I have tried this (but it doesn't work):
$myOutputFolder = $OutputFolder
$myOutputFolder.Replace("\\\\","\\")
write-host "Parameter OutputFolder is ..... : $myOutputFolder"
Any help/guidance/suggestions most appreciated. If I work out a solution I will reply to own question.