Just FYI, PowerShell doesn't care if you use \ or / in paths so you could try:
$LogFile = "C:/Users/Me/Them/NPM Change Log.txt"
To get around possibly having to escape \
Also, is it just a typo but you seem to have only one " in:
Add-content "$LogFile -value $logline
To insert variables into a string you can try:
Add-content "$($LogFile)" -value $logline
That should expand the variable within the quotes.
I'm on a tablet atm so can't test these, in a couple of hours I can have a play.Addendum:
IIRC I had a similar thing with Add-Content that I was doing and the result was that Add-Content was one of the very few PowerShell commandlets that couldn't take a file in a variable.
I modified my script to use Out-File instead, eg.
"$(Get-Date), $ChangeType, $FullPath" | Out-File $Logfile -Append
Or similar, you may have to play around with enclosing the file variable in quotes as above.