Kategoriarkiv: Hide SPList

Set boolean properties in powershell

I just wanted to make an existing list hidden without using SharePoint Designer, since I hate SPD. =)

So I wrote a simple powershell script to do this and quickly realized I didn’t know how to write boolean values. I tried $list.Hidden = true but it generated an error. I tried $list.Hidden = “True” but it changed nothing. A quick search on the net and I found the answer. $list.Hidden = $true worked. So boolean values are written with the dollar sign in front. Good to know. =)

So this is how to set boolean values in PowerShell:

Just in case someone wants to know. Here is the full example on how to hide a list using PowerShell.