{"id":261,"date":"2011-03-18T16:14:51","date_gmt":"2011-03-18T15:14:51","guid":{"rendered":"http:\/\/dev.flauschig.ch\/wordpress\/?p=261"},"modified":"2011-03-18T16:14:51","modified_gmt":"2011-03-18T15:14:51","slug":"the-wicked-which-of-the-powershell","status":"publish","type":"post","link":"http:\/\/dev.flauschig.ch\/wordpress\/?p=261","title":{"rendered":"The wicked &#8220;which&#8221; of the PowerShell"},"content":{"rendered":"<p>Those of you familiar with Linux systems should know the very helpful &#8220;which&#8221; command which can tell you where exactly an executable that is in your PATH is located. The good news is, that a very similar command exists in PowerShell<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; toolbar: false; wrap-lines: false; notranslate\" title=\"\">\r\n&gt; get-command tf\r\n<\/pre>\n<p>If the TFS exectuable is in your path, this gives you output of the form.<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; toolbar: false; wrap-lines: false; notranslate\" title=\"\">\r\nCommandType     Name                     Definition\r\n-----------     ----                     ----------\r\nApplication     TF.exe                   C:\\Program Files\\Microsoft Visual Studio 9.0\\Com...\r\n<\/pre>\n<p>But that&#8217;s not very helpful, is it? I mean, a quite important part of the path is cut off for crying out loud. So how do you get the FULL path?<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; toolbar: false; wrap-lines: false; notranslate\" title=\"\">\r\n&gt; get-command tf | format-list\r\n\r\nName            : TF.exe\r\nCommandType     : Application\r\nDefinition      : C:\\Program Files\\Microsoft Visual Studio 9.0\\Common7\\IDE\\TF.exe\r\nExtension       : .exe\r\nPath            : C:\\Program Files\\Microsoft Visual Studio 9.0\\Common7\\IDE\\TF.exe\r\n...\r\n<\/pre>\n<p>And there you go. It&#8217;s a bit more complicated than necessary, but at least it&#8217;s possible.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Those of you familiar with Linux systems should know the very helpful &#8220;which&#8221; command which can tell you where exactly an executable that is in your PATH is located. The good news is, that a very similar command exists in PowerShell &gt; get-command tf If the TFS exectuable is in your path, this gives you &hellip; <\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-executor","4":"post-261","6":"format-standard","7":"category-uncategorized"},"acf":[],"views":1457,"_links":{"self":[{"href":"http:\/\/dev.flauschig.ch\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/261"}],"collection":[{"href":"http:\/\/dev.flauschig.ch\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/dev.flauschig.ch\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/dev.flauschig.ch\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"http:\/\/dev.flauschig.ch\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=261"}],"version-history":[{"count":0,"href":"http:\/\/dev.flauschig.ch\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/261\/revisions"}],"wp:attachment":[{"href":"http:\/\/dev.flauschig.ch\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/dev.flauschig.ch\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=261"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/dev.flauschig.ch\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}