I have some custom column created by office dev pnp template. It was visible initial. Then I set this column on hidden.
<Field ID="{1ada65e8-4f90-46c5-a663-a5812131215e}" Name="WorkspaceType" DisplayName="Workspace type" Type="Choice" Required="TRUE" Group="Valo" SourceID="{3647d1ac-79f7-474e-90ed-73078508a792}" StaticName="WorkspaceType" AllowDeletion="TRUE" EnforceUniqueValues="FALSE" Indexed="FALSE" FillInChoice="FALSE" Format="Dropdown" Hidden="TRUE" >
<CHOICES>
<CHOICE>Team</CHOICE>
<CHOICE>Community</CHOICE>
<CHOICE>Internal Project</CHOICE>
<CHOICE>Proposal</CHOICE>
<CHOICE>External Project</CHOICE>
</CHOICES>
</Field>
Now I would like to unhide this column. It is not working in office dev pnp template so I would like to do that in powershell. I try this but it is not working:
Connect-PnPOnline -Url http://myO365SiteCollection.com
$field = Get-PnPField -Identity WorkspaceType
$field.Hidden = $False
$field.Update()
$ctx = Get-PnPContext
$ctx.ExecuteQuery()
After this I go to site settings and go to columns. I still not see my column. I close the powershell window and open a new instance. I check what the value is of field.hidden property and it says it is true. So my change is not executed. What I am doing wrong. If someone know another solution how to unhide a column please let me know.