Hi, I'm struggling with the correct way to concatenate a pre-defined variable with the contents of a text file pulled from GC.variable:
$DriveLetter = ($MountResult | Get-Disk | Get-Partition).DriveLetter
merged with each line contained within:
$List = (Get-Content "C:\scripts\UPD_cleanup.txt")
\appdata\local\temp*
\AppData\Roaming\Mozilla\Firefox\Crash Reports
\AppData\Local\Microsoft\WebCache.old
to end up with:
G:\appdata\local\temp*
G:\AppData\Roaming\Mozilla\Firefox\Crash Reports
G:\AppData\Local\Microsoft\WebCache.old etc.
I tried a few things including:
$List = ($DriveLetter + ":")+(Get-Content "C:\scripts\UPD_cleanup.txt")
but it only worked for the first entry.
Thanks,
Brad