format-default : The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
CSOM ISSUE format-default
$col = $oWeb.AvailableFields | Where {$_.InternalName -eq "TestCategories"}
$context.Load($listDoc.Fields);
$context.Load($col);
$context.ExecuteQuery();
$null = $listDoc.Fields.Add($col);
if $col is null because the field "TestCategories" does not exist in $oWeb.AvailableFields you've got this message