Friday, August 24, 2012

Powershell tip 1: get-member


Get-Member will tell you all the properties and methods of an object.

So,

“this is a string” | Get-Member will return all the string options like split, join, whatever.

Get-SPContentDatabase | Get-Member on a sharepoint server will show you lots of methods you can run on the db, like “DiskSizeRequired” and “Server” to get information about the db.  

So if you have something in powershell and don’t know what to do with it, try piping it to get-member. 

No comments:

Post a Comment