Im trying to import a number from text file.
So I have created this:
$Subtotal = $text | Select-String -Pattern Subtotal | Select-Object -First 1
$Subtotal = $Subtotal.line
$Subtotal = $Subtotal.trim("Subtotal ")
$Transportcost = $text | Select-String -Pattern Transportcost | Select-Object -First 1
$Transportcost = $Transportcost.line
$Transportcost = $Transportcost.trim("Transportcost ")
now I need the sum of $subtotal + $transport but that doesn't work as $subtotal and $transportcost are system.objects
How do I convert?