{"id":13315,"date":"2017-01-30T06:00:22","date_gmt":"2017-01-30T14:00:22","guid":{"rendered":"https:\/\/www.sapien.com\/blog\/?p=13315"},"modified":"2017-01-28T13:25:10","modified_gmt":"2017-01-28T21:25:10","slug":"friday-puzzle-why-doesnt-include-include","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/","title":{"rendered":"Friday Puzzle: Why doesn\u2019t Include include?"},"content":{"rendered":"<p>On Friday, January 20, 2017, I posted the following puzzle on <a href=\"https:\/\/twitter.com\/juneb_get_help\/status\/822448851579596800\" target=\"_blank\">Twitter <\/a>and <a href=\"https:\/\/www.facebook.com\/SAPIENTech\/photos\/a.10151095012027283.433079.82797372282\/10154242716222283\/?type=3\" target=\"_blank\">Facebook <\/a>(and <a href=\"https:\/\/www.facebook.com\/groups\/powershell\/permalink\/1321915161199992\/?match=cHV6emxlLGZyaWRheQ%3D%3D\" target=\"_blank\">here<\/a>!).<\/p>\n<p>It shows a <a href=\"http:\/\/technet.microsoft.com\/library\/hh847897(v=wps.630).aspx\" target=\"_blank\">Get-ChildItem<\/a> command where the value of the <strong>Path<\/strong> parameter is $PSHome, the Windows PowerShell installation directory, and the value of the <strong>Include<\/strong> parameter is &#8216;*ps1xml.&#8217; The command returns nothing &#8212; not a single file &#8212; even though the next command shows that there are 14 *.ps1xml files in the root of the $PSHome directory.<\/p>\n<p>What happened here? Why didn&#8217;t the Get-ChildItem -Include command work?<\/p>\n<p style=\"padding-left: 30px;\"><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image001.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-13316\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image001.png\" alt=\"\" width=\"468\" height=\"245\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image001.png 800w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image001-300x157.png 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image001-768x402.png 768w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><\/a><\/p>\n<p>This might enlighten you. Or, confuse you even more. In this command, we add &#8216;\\*&#8217; to the path, which indicates its immediate subfolders. When you add &#8216;\\*&#8217;, Get-ChildItem gets the .ps1xml files in its <strong><em><u>root<\/u><\/em><\/strong> folder.<\/p>\n<p style=\"padding-left: 30px;\"><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image003.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-13317\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image003.png\" alt=\"\" width=\"460\" height=\"216\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image003.png 800w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image003-300x141.png 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image003-768x360.png 768w\" sizes=\"auto, (max-width: 460px) 100vw, 460px\" \/><\/a><\/p>\n<p>And, adding <strong>-Recurse<\/strong> works, too, although it gets all .ps1xml files in all subdirectories of $PSHome recursively. And, sadly the <strong>Depth<\/strong> parameter (new in PowerShell 5.0) seems to have no effect on Get-ChildItem when -Include or -Exclude are used (not documented).<\/p>\n<pre class=\"output\">PS C:\\&gt; Get-ChildItem -Path $PSHome -Include '*ps1xml' -Recurse<\/pre>\n<p>What&#8217;s going on here?<\/p>\n<p>&nbsp;<\/p>\n<h1>About the Include Parameter<\/h1>\n<p>To solve the mystery, look at help for the <strong>Include<\/strong> parameter. I worked really hard to get this parameter description right, so I remember it well.<\/p>\n<p>As we&#8217;ve found, the <strong>Include<\/strong> parameter works only when the path includes &#8220;\\*&#8221; or the command includes the <strong>Recurse<\/strong> parameter.<\/p>\n<p style=\"padding-left: 30px;\"><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image005.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-13318\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image005.png\" alt=\"\" width=\"487\" height=\"191\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image005.png 790w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image005-300x117.png 300w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image005-768x300.png 768w\" sizes=\"auto, (max-width: 487px) 100vw, 487px\" \/><\/a><\/p>\n<p>The coolest thing about the <strong>Include<\/strong> and <strong>Exclude<\/strong> parameters are that they take an array of values, and include or exclude all items in the array.<\/p>\n<pre class=\"output\">PS C:\\ &gt; Get-ChildItem -Path $PSHOME\\* -Include \"*.xml\", \"*.txt\"<\/pre>\n<p><strong>TIP: <\/strong>Exclude does not require -Recurse or &#8216;\\*&#8217;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Include<\/strong> is critical in PowerShell 2.0, because the <strong>Recurse<\/strong> parameter doesn&#8217;t work on items that have no child-items.<\/p>\n<pre class=\"output\"><span style=\"color: lightgreen;\"># This fails<\/span>\r\nPS C:\\&gt; Get-ChildItem -Path $PSHome\\*.ps1xml -Recurse<\/pre>\n<p>In Windows PowerShell 2.0, you need to do this:<\/p>\n<pre class=\"output\"><span style=\"color: lightgreen;\"># This works<\/span>\r\nPS C:\\&gt; Get-ChildItem -Path $PSHome\\* -Recurse -Include '*ps1xml'<\/pre>\n<h1>Which parameters can you use?<\/h1>\n<p>To get .psm1xml files in a directory, you can specify the file name extension on the Path parameter.<\/p>\n<pre class=\"output\">PS C:\\&gt; Get-ChildItem -Path $PSHome\\*.ps1xml<\/pre>\n<p>&nbsp;<\/p>\n<p>Beginning in PowerShell 3.0, you can use the <strong>Recurse<\/strong> parameter even when the <strong>Path<\/strong> value is an item without child-items (a &#8220;leaf&#8221;).<\/p>\n<pre class=\"output\">PS C:\\&gt; Get-ChildItem -Path $PSHome\\*.ps1xml -Recurse<\/pre>\n<p>&nbsp;<\/p>\n<p>You can also use the <strong>Filter<\/strong> parameter. But neither take an array.<\/p>\n<pre class=\"output\">PS C:\\&gt; Get-ChildItem -Path $PSHome -Filter \"*.ps1xml\"\r\n\r\n<\/pre>\n<p>You can also use the <strong>Exclude<\/strong> parameter, which works without the &#8216;\\*&#8217; and Recurse, although it has the opposite effect. And, like <strong>Include<\/strong>, when you use the <strong>Recurse<\/strong> parameter with <strong>Exclude<\/strong>, the <strong>Depth<\/strong> parameter has no effect.<\/p>\n<pre class=\"output\">PS C:\\&gt; Get-ChildItem -Path $PSHome -Exclude \"*.ps1xml\"<\/pre>\n<p>&nbsp;<\/p>\n<p>And, you can pipe the result to Where-Object or the Where method, although those options are significantly slower.<\/p>\n<pre class=\"output\">PS C:\\&gt; Get-ChildItem -Path $PSHOME | Where-Object {$_.Extension -eq '.ps1xml' -or $_.Extension -eq '.dll'}<\/pre>\n<pre class=\"output\">PS C:\\&gt; (Get-ChildItem -Path $PSHOME).where({$_.Extension -eq '.ps1xml' -or $_.Extension -eq '.dll'})<\/pre>\n<p>&nbsp;<\/p>\n<h1>Read the help!<\/h1>\n<p>So, the moral of the story is to read the help. And, when the help is missing or wrong, file an issue on <a href=\"https:\/\/windowsserver.uservoice.com\/forums\/301869-powershell\/category\/148056-documentation\">UserVoice<\/a> or in <a href=\"https:\/\/github.com\/PowerShell\/PowerShell-Docs\/issues\/889\">the PowerShell-Docs repo on GitHub<\/a>. The cool folks on the PowerShell team, and their open-source helpers, respond very quickly.<\/p>\n<p style=\"padding-left: 30px;\"><a href=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image007.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-13319\" src=\"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image007.png\" alt=\"\" width=\"424\" height=\"149\" srcset=\"https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image007.png 571w, https:\/\/dev.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image007-300x106.png 300w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/a><\/p>\n<p>Like this Friday PowerShell Puzzle? <a href=\"https:\/\/www.sapien.com\/blog\/?s=Friday+puzzle\">Find more puzzles here<\/a>. If you have a PowerShell puzzle suggestion, post it here or ping me on Twitter at <a href=\"https:\/\/twitter.com\/juneb_get_help\">@juneb_get_help<\/a>.<\/p>\n<p><span class=\"blog-half-page\"><i>June Blender is a technology evangelist at SAPIEN Technologies, Inc and a Microsoft Cloud &amp; Datacenter MVP. You can reach her at <a href=\"mailto:juneb@sapien.com\">juneb@sapien.com<\/a> or follow her on Twitter at <a href=\"https:\/\/twitter.com\/juneb_get_help\">@juneb_get_help<\/a>.<\/i><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>On Friday, January 20, 2017, I posted the following puzzle on Twitter and Facebook (and here!). It shows a Get-ChildItem command where the value of the Path parameter is $PSHome, the Windows PowerShell installation directory, and the value of the Include parameter is &#8216;*ps1xml.&#8217; The command returns nothing &#8212; not a single file &#8212; even [&hellip;]<\/p>\n","protected":false},"author":31,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[932,2,1143,941,1182,25],"tags":[1187,934,28,1186],"class_list":["post-13315","post","type-post","status-publish","format-standard","hentry","category-beginners","category-general","category-powershell","category-powershell-5-0","category-puzzle","category-windows-powershell","tag-friday-puzzle","tag-juneb","tag-powershell","tag-puzzle"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"On Friday, January 20, 2017, I posted the following puzzle on Twitter and Facebook (and here!). It shows a Get-ChildItem command where the value of the Path parameter is $PSHome, the Windows PowerShell installation directory, and the value of the Include parameter is &#039;*ps1xml.&#039; The command returns nothing -- not a single file -- even\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"June Blender\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"DEV SAPIEN Blog - Tools for IT Success\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Friday Puzzle: Why doesn\u2019t Include include? - DEV SAPIEN Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"On Friday, January 20, 2017, I posted the following puzzle on Twitter and Facebook (and here!). It shows a Get-ChildItem command where the value of the Path parameter is $PSHome, the Windows PowerShell installation directory, and the value of the Include parameter is &#039;*ps1xml.&#039; The command returns nothing -- not a single file -- even\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2017-01-30T14:00:22+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2017-01-28T21:25:10+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Friday Puzzle: Why doesn\u2019t Include include? - DEV SAPIEN Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"On Friday, January 20, 2017, I posted the following puzzle on Twitter and Facebook (and here!). It shows a Get-ChildItem command where the value of the Path parameter is $PSHome, the Windows PowerShell installation directory, and the value of the Include parameter is &#039;*ps1xml.&#039; The command returns nothing -- not a single file -- even\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2017\\\/01\\\/30\\\/friday-puzzle-why-doesnt-include-include\\\/#blogposting\",\"name\":\"Friday Puzzle: Why doesn\\u2019t Include include? - DEV SAPIEN Blog\",\"headline\":\"Friday Puzzle: Why doesn\\u2019t Include include?\",\"author\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/author\\\/juneblender\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.sapien.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/01\\\/image001.png\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2017\\\/01\\\/30\\\/friday-puzzle-why-doesnt-include-include\\\/#articleImage\"},\"datePublished\":\"2017-01-30T06:00:22-08:00\",\"dateModified\":\"2017-01-28T13:25:10-08:00\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2017\\\/01\\\/30\\\/friday-puzzle-why-doesnt-include-include\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2017\\\/01\\\/30\\\/friday-puzzle-why-doesnt-include-include\\\/#webpage\"},\"articleSection\":\"Beginners, General, PowerShell, PowerShell 5.0, Puzzle, Windows PowerShell, Friday Puzzle, juneb, powershell, Puzzle\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2017\\\/01\\\/30\\\/friday-puzzle-why-doesnt-include-include\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/dev.sapien.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/topics\\\/general\\\/#listItem\",\"name\":\"General\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/topics\\\/general\\\/#listItem\",\"position\":2,\"name\":\"General\",\"item\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/topics\\\/general\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2017\\\/01\\\/30\\\/friday-puzzle-why-doesnt-include-include\\\/#listItem\",\"name\":\"Friday Puzzle: Why doesn\\u2019t Include include?\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2017\\\/01\\\/30\\\/friday-puzzle-why-doesnt-include-include\\\/#listItem\",\"position\":3,\"name\":\"Friday Puzzle: Why doesn\\u2019t Include include?\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/topics\\\/general\\\/#listItem\",\"name\":\"General\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/#organization\",\"name\":\"DEV SAPIEN Blog\",\"description\":\"Tools for IT Success\",\"url\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/author\\\/juneblender\\\/#author\",\"url\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/author\\\/juneblender\\\/\",\"name\":\"June Blender\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2017\\\/01\\\/30\\\/friday-puzzle-why-doesnt-include-include\\\/#webpage\",\"url\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2017\\\/01\\\/30\\\/friday-puzzle-why-doesnt-include-include\\\/\",\"name\":\"Friday Puzzle: Why doesn\\u2019t Include include? - DEV SAPIEN Blog\",\"description\":\"On Friday, January 20, 2017, I posted the following puzzle on Twitter and Facebook (and here!). It shows a Get-ChildItem command where the value of the Path parameter is $PSHome, the Windows PowerShell installation directory, and the value of the Include parameter is '*ps1xml.' The command returns nothing -- not a single file -- even\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2017\\\/01\\\/30\\\/friday-puzzle-why-doesnt-include-include\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/author\\\/juneblender\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/author\\\/juneblender\\\/#author\"},\"datePublished\":\"2017-01-30T06:00:22-08:00\",\"dateModified\":\"2017-01-28T13:25:10-08:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/\",\"name\":\"DEV SAPIEN Blog\",\"description\":\"Tools for IT Success\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Friday Puzzle: Why doesn\u2019t Include include? - DEV SAPIEN Blog","description":"On Friday, January 20, 2017, I posted the following puzzle on Twitter and Facebook (and here!). It shows a Get-ChildItem command where the value of the Path parameter is $PSHome, the Windows PowerShell installation directory, and the value of the Include parameter is '*ps1xml.' The command returns nothing -- not a single file -- even","canonical_url":"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/#blogposting","name":"Friday Puzzle: Why doesn\u2019t Include include? - DEV SAPIEN Blog","headline":"Friday Puzzle: Why doesn\u2019t Include include?","author":{"@id":"https:\/\/dev.sapien.com\/blog\/author\/juneblender\/#author"},"publisher":{"@id":"https:\/\/dev.sapien.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2017\/01\/image001.png","@id":"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/#articleImage"},"datePublished":"2017-01-30T06:00:22-08:00","dateModified":"2017-01-28T13:25:10-08:00","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/#webpage"},"isPartOf":{"@id":"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/#webpage"},"articleSection":"Beginners, General, PowerShell, PowerShell 5.0, Puzzle, Windows PowerShell, Friday Puzzle, juneb, powershell, Puzzle"},{"@type":"BreadcrumbList","@id":"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/dev.sapien.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog\/topics\/general\/#listItem","name":"General"}},{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog\/topics\/general\/#listItem","position":2,"name":"General","item":"https:\/\/dev.sapien.com\/blog\/topics\/general\/","nextItem":{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/#listItem","name":"Friday Puzzle: Why doesn\u2019t Include include?"},"previousItem":{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/#listItem","position":3,"name":"Friday Puzzle: Why doesn\u2019t Include include?","previousItem":{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog\/topics\/general\/#listItem","name":"General"}}]},{"@type":"Organization","@id":"https:\/\/dev.sapien.com\/blog\/#organization","name":"DEV SAPIEN Blog","description":"Tools for IT Success","url":"https:\/\/dev.sapien.com\/blog\/"},{"@type":"Person","@id":"https:\/\/dev.sapien.com\/blog\/author\/juneblender\/#author","url":"https:\/\/dev.sapien.com\/blog\/author\/juneblender\/","name":"June Blender"},{"@type":"WebPage","@id":"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/#webpage","url":"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/","name":"Friday Puzzle: Why doesn\u2019t Include include? - DEV SAPIEN Blog","description":"On Friday, January 20, 2017, I posted the following puzzle on Twitter and Facebook (and here!). It shows a Get-ChildItem command where the value of the Path parameter is $PSHome, the Windows PowerShell installation directory, and the value of the Include parameter is '*ps1xml.' The command returns nothing -- not a single file -- even","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/dev.sapien.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/#breadcrumblist"},"author":{"@id":"https:\/\/dev.sapien.com\/blog\/author\/juneblender\/#author"},"creator":{"@id":"https:\/\/dev.sapien.com\/blog\/author\/juneblender\/#author"},"datePublished":"2017-01-30T06:00:22-08:00","dateModified":"2017-01-28T13:25:10-08:00"},{"@type":"WebSite","@id":"https:\/\/dev.sapien.com\/blog\/#website","url":"https:\/\/dev.sapien.com\/blog\/","name":"DEV SAPIEN Blog","description":"Tools for IT Success","inLanguage":"en-US","publisher":{"@id":"https:\/\/dev.sapien.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"DEV SAPIEN Blog - Tools for IT Success","og:type":"article","og:title":"Friday Puzzle: Why doesn\u2019t Include include? - DEV SAPIEN Blog","og:description":"On Friday, January 20, 2017, I posted the following puzzle on Twitter and Facebook (and here!). It shows a Get-ChildItem command where the value of the Path parameter is $PSHome, the Windows PowerShell installation directory, and the value of the Include parameter is '*ps1xml.' The command returns nothing -- not a single file -- even","og:url":"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/","article:published_time":"2017-01-30T14:00:22+00:00","article:modified_time":"2017-01-28T21:25:10+00:00","twitter:card":"summary_large_image","twitter:title":"Friday Puzzle: Why doesn\u2019t Include include? - DEV SAPIEN Blog","twitter:description":"On Friday, January 20, 2017, I posted the following puzzle on Twitter and Facebook (and here!). It shows a Get-ChildItem command where the value of the Path parameter is $PSHome, the Windows PowerShell installation directory, and the value of the Include parameter is '*ps1xml.' The command returns nothing -- not a single file -- even"},"aioseo_meta_data":{"post_id":"13315","title":null,"description":null,"keywords":null,"keyphrases":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-08-28 16:03:37","updated":"2026-08-28 16:03:37"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/dev.sapien.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/dev.sapien.com\/blog\/topics\/general\/\" title=\"General\">General<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tFriday Puzzle: Why doesn\u2019t Include include?\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/dev.sapien.com\/blog"},{"label":"General","link":"https:\/\/dev.sapien.com\/blog\/topics\/general\/"},{"label":"Friday Puzzle: Why doesn\u2019t Include include?","link":"https:\/\/dev.sapien.com\/blog\/2017\/01\/30\/friday-puzzle-why-doesnt-include-include\/"}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/13315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=13315"}],"version-history":[{"count":13,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/13315\/revisions"}],"predecessor-version":[{"id":13332,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/13315\/revisions\/13332"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=13315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=13315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=13315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}