Pages

Wednesday, July 10, 2013

Print Properties of an Object

This is a note for me just in case to forget how to print all the properties of an object in powershell.
Let think about this, you wanna print all the properties in a SPWeb property bag. To do that you can write a script like this:
$site = Get-SPSite -Identity https://mySPSite
$site.RootWeb.AllProperties | % {$_ | Format-Table | Out-String)}


If you want can show the Properties Table as a List just changing the Format-Table command with Format-List

see ya!

No comments:

Post a Comment