$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 your parameters are strongly typed, the method will resolve correctly: [System.IO.File]::AppendAllLines([string]$path, [string[]]$output)