process{if($ClientContext-eq$null){throw"Cannot bind argument to parameter 'ClientContext' because it is null."}if($PSCmdlet.ParameterSetName-eq'ClientObject'){if(-not$ClientObject.IsPropertyAvailable('Id')){Invoke-ClientContextLoad`-ClientContext$ClientContext`-ClientObject$ClientObject`-Retrieval'Id,SchemaXml'}}else{$ClientObjectCollection=$ParentObject.ClientObject.Fieldsif($PSCmdlet.ParameterSetName-eq'Identity'){$PathMethod=New-ObjectMicrosoft.SharePoint.Client.ObjectPathMethod(`$ClientContext,`$ClientObjectCollection.Path,`'GetById',`[object[]]$Identity)$ClientObject=New-ObjectMicrosoft.SharePoint.Client.Field($ClientContext,$PathMethod)Invoke-ClientContextLoad`-ClientContext$ClientContext`-ClientObject$ClientObject`-Retrieval'Id,SchemaXml'trap{throw'The specified column could not be found.'}}if($PSCmdlet.ParameterSetName-eq'Name'){$PathMethod=New-ObjectMicrosoft.SharePoint.Client.ObjectPathMethod(`$ClientContext,`$ClientObjectCollection.Path,`'GetByInternalNameOrTitle',`[object[]]$Name)$ClientObject=New-ObjectMicrosoft.SharePoint.Client.Field($ClientContext,$PathMethod)Invoke-ClientContextLoad`-ClientContext$ClientContext`-ClientObject$ClientObject`-Retrieval'Id,SchemaXml'trap{throw'The specified column could not be found.'}}}$Xml=[xml]$ClientObject.SchemaXml$Xml.DocumentElement.SetAttribute('Hidden','FALSE')$Xml.DocumentElement.SetAttribute('ReadOnly','FALSE')$ClientObject.SchemaXml=$Xml.InnerXml$ClientObject.DeleteObject()$ClientContext.ExecuteQuery()}