{"id":197,"date":"2014-02-10T14:17:13","date_gmt":"2014-02-10T20:17:13","guid":{"rendered":"http:\/\/gimpland.org\/now\/?p=197"},"modified":"2014-02-10T14:17:13","modified_gmt":"2014-02-10T20:17:13","slug":"powershell-foreach-array-element","status":"publish","type":"post","link":"https:\/\/gimpland.org\/now\/2014\/02\/powershell-foreach-array-element\/","title":{"rendered":"Powershell &#8211; foreach array element"},"content":{"rendered":"<p>In powershell you can do a foreach loop much like perl<\/p>\n<pre>$array = @(\"test1\", \"test2\", \"test3\")\r\nforeach ($value in $array) {\r\n\t$value\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In powershell you can do a foreach loop much like perl $array = @(&#8220;test1&#8221;, &#8220;test2&#8221;, &#8220;test3&#8221;) foreach ($value in $array) { $value }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[110,109],"tags":[17,115,116,111,112,61],"class_list":["post-197","post","type-post","status-publish","format-standard","hentry","category-powershell","category-programming","tag-cli","tag-foreach","tag-loop","tag-powershell-2","tag-script","tag-windows"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Powershell - foreach array element - gimpland.org<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gimpland.org\/now\/2014\/02\/powershell-foreach-array-element\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Powershell - foreach array element - gimpland.org\" \/>\n<meta property=\"og:description\" content=\"In powershell you can do a foreach loop much like perl $array = @(&quot;test1&quot;, &quot;test2&quot;, &quot;test3&quot;) foreach ($value in $array) { $value }\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gimpland.org\/now\/2014\/02\/powershell-foreach-array-element\/\" \/>\n<meta property=\"og:site_name\" content=\"gimpland.org\" \/>\n<meta property=\"article:published_time\" content=\"2014-02-10T20:17:13+00:00\" \/>\n<meta name=\"author\" content=\"imp7\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"imp7\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/gimpland.org\\\/now\\\/2014\\\/02\\\/powershell-foreach-array-element\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gimpland.org\\\/now\\\/2014\\\/02\\\/powershell-foreach-array-element\\\/\"},\"author\":{\"name\":\"imp7\",\"@id\":\"https:\\\/\\\/gimpland.org\\\/now\\\/#\\\/schema\\\/person\\\/5a73603e0ec30511d5b90534c76679fb\"},\"headline\":\"Powershell &#8211; foreach array element\",\"datePublished\":\"2014-02-10T20:17:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/gimpland.org\\\/now\\\/2014\\\/02\\\/powershell-foreach-array-element\\\/\"},\"wordCount\":16,\"commentCount\":0,\"keywords\":[\"cli\",\"foreach\",\"loop\",\"powershell\",\"script\",\"windows\"],\"articleSection\":[\"Powershell\",\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/gimpland.org\\\/now\\\/2014\\\/02\\\/powershell-foreach-array-element\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gimpland.org\\\/now\\\/2014\\\/02\\\/powershell-foreach-array-element\\\/\",\"url\":\"https:\\\/\\\/gimpland.org\\\/now\\\/2014\\\/02\\\/powershell-foreach-array-element\\\/\",\"name\":\"Powershell - foreach array element - gimpland.org\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gimpland.org\\\/now\\\/#website\"},\"datePublished\":\"2014-02-10T20:17:13+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/gimpland.org\\\/now\\\/#\\\/schema\\\/person\\\/5a73603e0ec30511d5b90534c76679fb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gimpland.org\\\/now\\\/2014\\\/02\\\/powershell-foreach-array-element\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gimpland.org\\\/now\\\/#website\",\"url\":\"https:\\\/\\\/gimpland.org\\\/now\\\/\",\"name\":\"gimpland.org\",\"description\":\"Donate by bitcoin: 12E1LyKb9Wwzw3iy6V4oWpHDXkTRC6UHJ9\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gimpland.org\\\/now\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/gimpland.org\\\/now\\\/#\\\/schema\\\/person\\\/5a73603e0ec30511d5b90534c76679fb\",\"name\":\"imp7\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d0544d7ec7cea4e1a78e16ae627707fdc0a3f9d32087dd9a87038b079316ac2d?s=96&d=identicon&r=x\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d0544d7ec7cea4e1a78e16ae627707fdc0a3f9d32087dd9a87038b079316ac2d?s=96&d=identicon&r=x\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d0544d7ec7cea4e1a78e16ae627707fdc0a3f9d32087dd9a87038b079316ac2d?s=96&d=identicon&r=x\",\"caption\":\"imp7\"},\"url\":\"https:\\\/\\\/gimpland.org\\\/now\\\/author\\\/imp7\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Powershell - foreach array element - gimpland.org","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gimpland.org\/now\/2014\/02\/powershell-foreach-array-element\/","og_locale":"en_US","og_type":"article","og_title":"Powershell - foreach array element - gimpland.org","og_description":"In powershell you can do a foreach loop much like perl $array = @(\"test1\", \"test2\", \"test3\") foreach ($value in $array) { $value }","og_url":"https:\/\/gimpland.org\/now\/2014\/02\/powershell-foreach-array-element\/","og_site_name":"gimpland.org","article_published_time":"2014-02-10T20:17:13+00:00","author":"imp7","twitter_misc":{"Written by":"imp7"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/gimpland.org\/now\/2014\/02\/powershell-foreach-array-element\/#article","isPartOf":{"@id":"https:\/\/gimpland.org\/now\/2014\/02\/powershell-foreach-array-element\/"},"author":{"name":"imp7","@id":"https:\/\/gimpland.org\/now\/#\/schema\/person\/5a73603e0ec30511d5b90534c76679fb"},"headline":"Powershell &#8211; foreach array element","datePublished":"2014-02-10T20:17:13+00:00","mainEntityOfPage":{"@id":"https:\/\/gimpland.org\/now\/2014\/02\/powershell-foreach-array-element\/"},"wordCount":16,"commentCount":0,"keywords":["cli","foreach","loop","powershell","script","windows"],"articleSection":["Powershell","Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/gimpland.org\/now\/2014\/02\/powershell-foreach-array-element\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/gimpland.org\/now\/2014\/02\/powershell-foreach-array-element\/","url":"https:\/\/gimpland.org\/now\/2014\/02\/powershell-foreach-array-element\/","name":"Powershell - foreach array element - gimpland.org","isPartOf":{"@id":"https:\/\/gimpland.org\/now\/#website"},"datePublished":"2014-02-10T20:17:13+00:00","author":{"@id":"https:\/\/gimpland.org\/now\/#\/schema\/person\/5a73603e0ec30511d5b90534c76679fb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gimpland.org\/now\/2014\/02\/powershell-foreach-array-element\/"]}]},{"@type":"WebSite","@id":"https:\/\/gimpland.org\/now\/#website","url":"https:\/\/gimpland.org\/now\/","name":"gimpland.org","description":"Donate by bitcoin: 12E1LyKb9Wwzw3iy6V4oWpHDXkTRC6UHJ9","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gimpland.org\/now\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/gimpland.org\/now\/#\/schema\/person\/5a73603e0ec30511d5b90534c76679fb","name":"imp7","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d0544d7ec7cea4e1a78e16ae627707fdc0a3f9d32087dd9a87038b079316ac2d?s=96&d=identicon&r=x","url":"https:\/\/secure.gravatar.com\/avatar\/d0544d7ec7cea4e1a78e16ae627707fdc0a3f9d32087dd9a87038b079316ac2d?s=96&d=identicon&r=x","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d0544d7ec7cea4e1a78e16ae627707fdc0a3f9d32087dd9a87038b079316ac2d?s=96&d=identicon&r=x","caption":"imp7"},"url":"https:\/\/gimpland.org\/now\/author\/imp7\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4dqkb-3b","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/gimpland.org\/now\/wp-json\/wp\/v2\/posts\/197","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gimpland.org\/now\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gimpland.org\/now\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gimpland.org\/now\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gimpland.org\/now\/wp-json\/wp\/v2\/comments?post=197"}],"version-history":[{"count":2,"href":"https:\/\/gimpland.org\/now\/wp-json\/wp\/v2\/posts\/197\/revisions"}],"predecessor-version":[{"id":199,"href":"https:\/\/gimpland.org\/now\/wp-json\/wp\/v2\/posts\/197\/revisions\/199"}],"wp:attachment":[{"href":"https:\/\/gimpland.org\/now\/wp-json\/wp\/v2\/media?parent=197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gimpland.org\/now\/wp-json\/wp\/v2\/categories?post=197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gimpland.org\/now\/wp-json\/wp\/v2\/tags?post=197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}