{"id":226,"date":"2011-11-02T11:27:25","date_gmt":"2011-11-02T15:27:25","guid":{"rendered":"http:\/\/digitallibraryworld.com\/?p=226"},"modified":"2011-11-02T11:27:25","modified_gmt":"2011-11-02T15:27:25","slug":"how-to-easily-list-all-methods-and-properties-of-an-object-in-powershell","status":"publish","type":"post","link":"https:\/\/heisbudi.com\/?p=226","title":{"rendered":"How to easily list all methods and properties of an object in Powershell"},"content":{"rendered":"<p>I don&#8217;t know about the RAM capacity in your head, but mine is kinda limited. Often time when I code in PowerShell, I don&#8217;t remember the exact name of a property\/method. With the date and time object particularly. It&#8217;s different, yet very similar among the many programming languages I use daily.<\/p>\n<p>so after I issue<br \/>\n<span style=\"color: #ff0000;\">$time=get-date<\/span><\/p>\n<p><span style=\"color: #000000;\">I usually fire up browser and go to Microsoft Technet PowerShell reference site to find the right command. I remember what it sounded like, but can&#8217;t remember exactly how to type it out. Yes you can type <span style=\"color: #ff0000;\">help get-date<\/span>. But it doesn&#8217;t tell you all the properties and method you need. <\/span><\/p>\n<p>if you want to know the list of all properties and method of an object\/variable, set a value to a variable, and pass that variable to get-member cmdlet<\/p>\n<p><span style=\"color: #ff0000;\">$time=get-date<\/span><br \/>\n<span style=\"color: #ff0000;\">$time | get-member<\/span><\/p>\n<p><span style=\"color: #000000;\">You&#8217;ll get all the properties and method that belong to<span style=\"color: #ff0000;\"> $time<\/span> variable. A real time saver. <\/span><\/p>\n<p><span style=\"color: #000000;\"><br \/>\n<\/span><\/p>\n<div data-counters='1' data-style='square' data-size='regular' data-url='https:\/\/heisbudi.com\/?p=226' data-title='How to easily list all methods and properties of an object in Powershell' class='linksalpha_container linksalpha_app_3'><a href='\/\/www.linksalpha.com\/share?network='facebook' class='linksalpha_icon_facebook'><\/a><a href='\/\/www.linksalpha.com\/share?network='twitter' class='linksalpha_icon_twitter'><\/a><a href='\/\/www.linksalpha.com\/share?network='googleplus' class='linksalpha_icon_googleplus'><\/a><a href='\/\/www.linksalpha.com\/share?network='mail' class='linksalpha_icon_mail'><\/a><\/div><div data-position='' data-url='https:\/\/heisbudi.com\/?p=226' data-title='How to easily list all methods and properties of an object in Powershell' class='linksalpha_container linksalpha_app_7'><a href='\/\/www.linksalpha.com\/share?network='facebook' class='linksalpha_icon_facebook'><\/a><a href='\/\/www.linksalpha.com\/share?network='twitter' class='linksalpha_icon_twitter'><\/a><a href='\/\/www.linksalpha.com\/share?network='googleplus' class='linksalpha_icon_googleplus'><\/a><a href='\/\/www.linksalpha.com\/share?network='mail' class='linksalpha_icon_mail'><\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>List all properties and methods of an object in PowerShell<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21,7,6],"tags":[],"_links":{"self":[{"href":"https:\/\/heisbudi.com\/index.php?rest_route=\/wp\/v2\/posts\/226"}],"collection":[{"href":"https:\/\/heisbudi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/heisbudi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/heisbudi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/heisbudi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=226"}],"version-history":[{"count":2,"href":"https:\/\/heisbudi.com\/index.php?rest_route=\/wp\/v2\/posts\/226\/revisions"}],"predecessor-version":[{"id":228,"href":"https:\/\/heisbudi.com\/index.php?rest_route=\/wp\/v2\/posts\/226\/revisions\/228"}],"wp:attachment":[{"href":"https:\/\/heisbudi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/heisbudi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/heisbudi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}