{"id":263,"date":"2022-10-09T14:47:18","date_gmt":"2022-10-09T06:47:18","guid":{"rendered":"https:\/\/islandtropicaman.com\/wp\/?p=263"},"modified":"2022-10-09T14:47:56","modified_gmt":"2022-10-09T06:47:56","slug":"how-to-create-a-for-loop-in-power-shell","status":"publish","type":"post","link":"https:\/\/islandtropicaman.com\/wp\/2022\/10\/09\/how-to-create-a-for-loop-in-power-shell\/","title":{"rendered":"How to create a for loop in Power Shell"},"content":{"rendered":"<p>In Power Shell script, the for loop is part of the flow control group which consists of the while loop, for each loop, the do&#8230;while loop and etc.<\/p>\n<p>In order to create a for loop in Power Shell followed this procedure:-<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nfor ($i = 0; $i -lt 10; $i++) { $i }\r\n<\/pre>\n<p>Basically, if you are a programmer then the statement above will look familiar, the -lt within the for loop simply means less than. The loop above will produce a number from 0 to 9.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n0\r\n1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n9\r\n<\/pre>\n<p>The power Shell flow loop has been often used in the power shell script language.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Power Shell script, the for loop is part of the flow control group which consists of the while loop, for each loop, the do&#8230;while loop and etc. In order to create a for loop in Power Shell followed this procedure:- for ($i = 0; $i -lt 10; $i++) { $i } Basically, if you&#8230;<\/p>\n<p class=\"more-link-wrap\"><a href=\"https:\/\/islandtropicaman.com\/wp\/2022\/10\/09\/how-to-create-a-for-loop-in-power-shell\/\" class=\"more-link\">Read More<span class=\"screen-reader-text\"> &ldquo;How to create a for loop in Power Shell&rdquo;<\/span> &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[78],"tags":[67],"class_list":["post-263","post","type-post","status-publish","format-standard","hentry","category-power-shell","tag-for-loop"],"blog_post_layout_featured_media_urls":{"thumbnail":"","full":""},"categories_names":{"78":{"name":"Power Shell","link":"https:\/\/islandtropicaman.com\/wp\/category\/power-shell\/"}},"tags_names":{"67":{"name":"for loop","link":"https:\/\/islandtropicaman.com\/wp\/tag\/for-loop\/"}},"comments_number":"0","_links":{"self":[{"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/posts\/263","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/comments?post=263"}],"version-history":[{"count":2,"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/posts\/263\/revisions"}],"predecessor-version":[{"id":265,"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/posts\/263\/revisions\/265"}],"wp:attachment":[{"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/media?parent=263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/categories?post=263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/tags?post=263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}