I am having a hard time getting the value of a Note Field and Yes/No checkbox with Powershell. Typically with OnPrem I can use $item["field"].tostring() and this will work. With 365 I do not seem to be able to use .tostring()
Can anyone offer any guidance on how to accomplish this?
$SPList = $GLOBAL:Web.Lists.GetByTitle("SomeList")
$spQuery = new-object Microsoft.SharePoint.client.camlquery
$spQuery.viewxml="<View><Query><Where><And><Eq><FieldRef Name='Status' /><Value Type='Text'>TextValue</Value></Eq><Eq><FieldRef Name='ProcessInitialWorkflow' /><Value Type='Text'>True</Value></Eq></And></Where></Query></View>"
$ListItems=$splist.GetItems($spQuery)
$Context.Load($ListItems)
$Context.ExecuteQuery()
#If Item is found then Update List Item Code here.
foreach($item in $listitems)
{
$item["Comments"].ToString();
$Comments=$item["Comments"];
write-host $Comments
}
The CAML works great and I can do anything with other fields, I just cannot read those two column types.