tags:

views:

26

answers:

1

Hey I got the following ps for retrieving the site template from SharePoint,but I do not quite undersantd what does the second half of the script( | ? {$_.IsHidden -eq $false }) does? Can someone explain this to me please as I am fairly new to PS.

Get-SPWebTemplate | ? {$_.IsHidden -eq $false }

A: 

The ? operator is an alias for where-object so the script is asking

Does the property isHidden from the object passed to me from get-spWebtemplate cmdlet property = false if so pass it on in the pipe line

rerun
You can also write it `where { -not $_.IsHidden }` which probably makes the intent a lot clearer and more readable.
Joey