{"id":103,"date":"2007-04-04T13:33:31","date_gmt":"2007-04-04T21:33:31","guid":{"rendered":"http:\/\/testblog.sapien.com\/index.php\/2007\/04\/04\/take-cmd-of-powershell\/"},"modified":"2007-04-04T13:33:31","modified_gmt":"2007-04-04T21:33:31","slug":"take-cmd-of-powershell","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2007\/04\/04\/take-cmd-of-powershell\/","title":{"rendered":"Take CMD of Powershell"},"content":{"rendered":"<p>Here&#8217;s another fast and furious Powershell tip.&nbsp; Even though Powershell has an alias for DIR, it is not the DIR command you&#8217;re used to.&nbsp; It is an alias to Get-ChildItem.&nbsp; This means if you are use to using commands like: <\/p>\n<p><font style=\"color: #0000ff\" color=\"#0000ff\">C:\\&gt; DIR *.exe \/w<\/font><\/p>\n<p>This will fail in Powershell.&nbsp; I think there are some Powershell Community extensions to work around this and I think the Powershell team is also looking at this. Fortunately, there is a simple remedy.&nbsp; In Powershell simply invoke CMD and run the DIR command like you always have in the past:<\/p>\n<p><font style=\"color: #0000ff\" color=\"#0000ff\">PS C:\\Scripts&gt; cmd \/c dir *.ps1 \/w \/od<\/font><\/p>\n<p>You&#8217;ll never know the difference.<\/p>\n<div class=\"wlWriterSmartContent\" id=\"0767317B-992E-4b12-91E0-4F059A8CECA8:f11bfa55-9e84-4cdf-bffe-eec490276805\" style=\"padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\"><span class=\"sizeLess20\">Technorati tags: <\/span><a href=\"http:\/\/technorati.com\/tags\/PowerShell\" rel=\"tag\"><span class=\"sizeLess20\">PowerShell<\/span><\/a><span class=\"sizeLess20\">, <\/span><a href=\"http:\/\/technorati.com\/tags\/Commandline\" rel=\"tag\"><span class=\"sizeLess20\">Commandline<\/span><\/a><\/div>\n<p><\/p>\n<div class=\"wlWriterSmartContent\" id=\"0767317B-992E-4b12-91E0-4F059A8CECA8:f7ee8e7f-bd57-42c0-9336-84dbd8add191\" style=\"padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\"><span class=\"sizeLess20\">del.icio.us tags: <\/span><a href=\"http:\/\/del.icio.us\/popular\/PowerShell\" rel=\"tag\"><span class=\"sizeLess20\">PowerShell<\/span><\/a><span class=\"sizeLess20\">, <\/span><a href=\"http:\/\/del.icio.us\/popular\/Commandline\" rel=\"tag\"><span class=\"sizeLess20\">Commandline<\/span><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s another fast and furious Powershell tip.  Even though Powershell has an alias for DIR, it is not the DIR command you&#8217;re used to.  It is an alias to Get-ChildItem.  This means if you are use to using commands like DIR *.exe \/w ,this will fail in Powershell. Fortunately, there is a simple remedy.<\/p>\n","protected":false},"author":3,"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":[25],"tags":[],"class_list":["post-103","post","type-post","status-publish","format-standard","hentry","category-windows-powershell"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Here\u2019s another fast and furious Powershell tip. Even though Powershell has an alias for DIR, it is not the DIR command you\u2019re used to. It is an alias to Get-ChildItem. This means if you are use to using commands like DIR *.exe \/w ,this will fail in Powershell. Fortunately, there is a simple remedy.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Jeffery Hicks\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/dev.sapien.com\/blog\/2007\/04\/04\/take-cmd-of-powershell\/\" \/>\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=\"Take CMD of Powershell - DEV SAPIEN Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Here\u2019s another fast and furious Powershell tip. Even though Powershell has an alias for DIR, it is not the DIR command you\u2019re used to. It is an alias to Get-ChildItem. This means if you are use to using commands like DIR *.exe \/w ,this will fail in Powershell. Fortunately, there is a simple remedy.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/dev.sapien.com\/blog\/2007\/04\/04\/take-cmd-of-powershell\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2007-04-04T21:33:31+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2007-04-04T21:33:31+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Take CMD of Powershell - DEV SAPIEN Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Here\u2019s another fast and furious Powershell tip. Even though Powershell has an alias for DIR, it is not the DIR command you\u2019re used to. It is an alias to Get-ChildItem. This means if you are use to using commands like DIR *.exe \/w ,this will fail in Powershell. Fortunately, there is a simple remedy.\" \/>\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\\\/2007\\\/04\\\/04\\\/take-cmd-of-powershell\\\/#blogposting\",\"name\":\"Take CMD of Powershell - DEV SAPIEN Blog\",\"headline\":\"Take CMD of Powershell\",\"author\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/author\\\/jeffery-hicks\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/#organization\"},\"datePublished\":\"2007-04-04T13:33:31-07:00\",\"dateModified\":\"2007-04-04T13:33:31-07:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2007\\\/04\\\/04\\\/take-cmd-of-powershell\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2007\\\/04\\\/04\\\/take-cmd-of-powershell\\\/#webpage\"},\"articleSection\":\"Windows PowerShell\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2007\\\/04\\\/04\\\/take-cmd-of-powershell\\\/#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\\\/windows-powershell\\\/#listItem\",\"name\":\"Windows PowerShell\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/topics\\\/windows-powershell\\\/#listItem\",\"position\":2,\"name\":\"Windows PowerShell\",\"item\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/topics\\\/windows-powershell\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2007\\\/04\\\/04\\\/take-cmd-of-powershell\\\/#listItem\",\"name\":\"Take CMD of Powershell\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2007\\\/04\\\/04\\\/take-cmd-of-powershell\\\/#listItem\",\"position\":3,\"name\":\"Take CMD of Powershell\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/topics\\\/windows-powershell\\\/#listItem\",\"name\":\"Windows PowerShell\"}}]},{\"@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\\\/jeffery-hicks\\\/#author\",\"url\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/author\\\/jeffery-hicks\\\/\",\"name\":\"Jeffery Hicks\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2007\\\/04\\\/04\\\/take-cmd-of-powershell\\\/#webpage\",\"url\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2007\\\/04\\\/04\\\/take-cmd-of-powershell\\\/\",\"name\":\"Take CMD of Powershell - DEV SAPIEN Blog\",\"description\":\"Here\\u2019s another fast and furious Powershell tip. Even though Powershell has an alias for DIR, it is not the DIR command you\\u2019re used to. It is an alias to Get-ChildItem. This means if you are use to using commands like DIR *.exe \\\/w ,this will fail in Powershell. Fortunately, there is a simple remedy.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2007\\\/04\\\/04\\\/take-cmd-of-powershell\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/author\\\/jeffery-hicks\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/author\\\/jeffery-hicks\\\/#author\"},\"datePublished\":\"2007-04-04T13:33:31-07:00\",\"dateModified\":\"2007-04-04T13:33:31-07: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":"Take CMD of Powershell - DEV SAPIEN Blog","description":"Here\u2019s another fast and furious Powershell tip. Even though Powershell has an alias for DIR, it is not the DIR command you\u2019re used to. It is an alias to Get-ChildItem. This means if you are use to using commands like DIR *.exe \/w ,this will fail in Powershell. Fortunately, there is a simple remedy.","canonical_url":"https:\/\/dev.sapien.com\/blog\/2007\/04\/04\/take-cmd-of-powershell\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/dev.sapien.com\/blog\/2007\/04\/04\/take-cmd-of-powershell\/#blogposting","name":"Take CMD of Powershell - DEV SAPIEN Blog","headline":"Take CMD of Powershell","author":{"@id":"https:\/\/dev.sapien.com\/blog\/author\/jeffery-hicks\/#author"},"publisher":{"@id":"https:\/\/dev.sapien.com\/blog\/#organization"},"datePublished":"2007-04-04T13:33:31-07:00","dateModified":"2007-04-04T13:33:31-07:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/dev.sapien.com\/blog\/2007\/04\/04\/take-cmd-of-powershell\/#webpage"},"isPartOf":{"@id":"https:\/\/dev.sapien.com\/blog\/2007\/04\/04\/take-cmd-of-powershell\/#webpage"},"articleSection":"Windows PowerShell"},{"@type":"BreadcrumbList","@id":"https:\/\/dev.sapien.com\/blog\/2007\/04\/04\/take-cmd-of-powershell\/#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\/windows-powershell\/#listItem","name":"Windows PowerShell"}},{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog\/topics\/windows-powershell\/#listItem","position":2,"name":"Windows PowerShell","item":"https:\/\/dev.sapien.com\/blog\/topics\/windows-powershell\/","nextItem":{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog\/2007\/04\/04\/take-cmd-of-powershell\/#listItem","name":"Take CMD of Powershell"},"previousItem":{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog\/2007\/04\/04\/take-cmd-of-powershell\/#listItem","position":3,"name":"Take CMD of Powershell","previousItem":{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog\/topics\/windows-powershell\/#listItem","name":"Windows PowerShell"}}]},{"@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\/jeffery-hicks\/#author","url":"https:\/\/dev.sapien.com\/blog\/author\/jeffery-hicks\/","name":"Jeffery Hicks"},{"@type":"WebPage","@id":"https:\/\/dev.sapien.com\/blog\/2007\/04\/04\/take-cmd-of-powershell\/#webpage","url":"https:\/\/dev.sapien.com\/blog\/2007\/04\/04\/take-cmd-of-powershell\/","name":"Take CMD of Powershell - DEV SAPIEN Blog","description":"Here\u2019s another fast and furious Powershell tip. Even though Powershell has an alias for DIR, it is not the DIR command you\u2019re used to. It is an alias to Get-ChildItem. This means if you are use to using commands like DIR *.exe \/w ,this will fail in Powershell. Fortunately, there is a simple remedy.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/dev.sapien.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/dev.sapien.com\/blog\/2007\/04\/04\/take-cmd-of-powershell\/#breadcrumblist"},"author":{"@id":"https:\/\/dev.sapien.com\/blog\/author\/jeffery-hicks\/#author"},"creator":{"@id":"https:\/\/dev.sapien.com\/blog\/author\/jeffery-hicks\/#author"},"datePublished":"2007-04-04T13:33:31-07:00","dateModified":"2007-04-04T13:33:31-07: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":"Take CMD of Powershell - DEV SAPIEN Blog","og:description":"Here\u2019s another fast and furious Powershell tip. Even though Powershell has an alias for DIR, it is not the DIR command you\u2019re used to. It is an alias to Get-ChildItem. This means if you are use to using commands like DIR *.exe \/w ,this will fail in Powershell. Fortunately, there is a simple remedy.","og:url":"https:\/\/dev.sapien.com\/blog\/2007\/04\/04\/take-cmd-of-powershell\/","article:published_time":"2007-04-04T21:33:31+00:00","article:modified_time":"2007-04-04T21:33:31+00:00","twitter:card":"summary_large_image","twitter:title":"Take CMD of Powershell - DEV SAPIEN Blog","twitter:description":"Here\u2019s another fast and furious Powershell tip. Even though Powershell has an alias for DIR, it is not the DIR command you\u2019re used to. It is an alias to Get-ChildItem. This means if you are use to using commands like DIR *.exe \/w ,this will fail in Powershell. Fortunately, there is a simple remedy."},"aioseo_meta_data":{"post_id":"103","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 14:18:34","updated":"2026-08-28 14:18:34"},"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\/windows-powershell\/\" title=\"Windows PowerShell\">Windows PowerShell<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tTake CMD of Powershell\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/dev.sapien.com\/blog"},{"label":"Windows PowerShell","link":"https:\/\/dev.sapien.com\/blog\/topics\/windows-powershell\/"},{"label":"Take CMD of Powershell","link":"https:\/\/dev.sapien.com\/blog\/2007\/04\/04\/take-cmd-of-powershell\/"}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/103","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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=103"}],"version-history":[{"count":0,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/103\/revisions"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}