$path = 'C:\text.txt' $output = 'This is an output string' # This works... [System.IO.File]::WriteAllLines($path, $output) # But this doesn't. WTF! [System.IO.File]::AppendAllLines($path, $output) # Result: 'Cannot find an overload for "AppendAllLines" and the argument count: "2".' # However, if you cast the string to an array, the correct overload can be found: [System.IO.File]::AppendAllLines([string]$path, [string[]]$output) # Hooray!