Missing data when trying to import large columns using powershell Powershell command (whitespace added for readability):

Invoke-Sqlcmd -ServerInstance "$db" -Database "$dbname" -Username "xxxx" -Password "xxx"
              -Query "select logmessages from log
                      where TIME_STAMP BETWEEN '2019-01-11 09:00:00' and '2019-01-11 09:02:00'
                      AND logmessages like '%string%'
                      order by TIME_STAMP"
              -QueryTimeout 0 -ConnectionTimeout 0
| Export-Csv "C:\Users\xxxxx\Desktop\PS\data.csv" -Append


Each row result is expected to be around 01 mb. The problem is I'm seeing partial data.

The table has 17 columns and I'm trying to fetch data from one of the column (type:varchar; length: -1) which typically stores xml data close to the size of 1mb per record. When I run a select statement against that column, only partial data is returned.
The column you are having trouble with us a varchar(Max) column. This is one of several "LOB data types", which can be up to 2GB. 

The invoke-sqlcmd PowerShell cmdlet will, by default, truncate strings to 4000 characters. This can be very useful to prevent accidently pulling back many GB of data from a query without realizing it. This is similar to the default query timeout, which prevents accidental long-running queries.

A "surprise" LOB column containing 2GB per row could pull back 1TB of data in as few as 500 rows--which would have unintended performance issues for other users on the server and possibly even on the local network, assuming a low bandwidth network.

To override that default, simply provide the -MaxCharLength parameter to indicate you want more than 4000 characters from your varchar(Max) column. (Similar to the way you already supply the -QueryTimeout 0 parameter.