{"id":349,"date":"2016-12-22T00:06:47","date_gmt":"2016-12-21T22:06:47","guid":{"rendered":"http:\/\/itsimple.info\/?p=349"},"modified":"2016-12-22T00:08:21","modified_gmt":"2016-12-21T22:08:21","slug":"how-to-return-one-value-from-a-powershell-select-property","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=349","title":{"rendered":"How to return one value from a PowerShell select property"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>When running select from powershell the result will be headers and value, if you what just the value you should use <code>-ExpandProperty switch, for example <\/code><\/p>\n<p>if you want to get just the username of file owner on c:\\1.txt :<\/p>\n<pre>$usr = GET-ACL C:\\1.txt | select -exp owner\r\necho $usr<\/pre>\n<h4>This will return :\u00a0 <strong>coputername\\username<\/strong><\/h4>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; &nbsp; When running select from powershell the result will be headers and value, if you what just the value you should use -ExpandProperty switch, for example if you want to get just the username of file owner on c:\\1.txt : $usr = GET-ACL C:\\1.txt | select -exp owner echo $usr This will return :\u00a0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,12,14],"tags":[],"class_list":["post-349","post","type-post","status-publish","format-standard","hentry","category-operating-systems","category-tutorials","category-windows"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=349"}],"version-history":[{"count":0,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/349\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}