{"id":3288,"date":"2021-05-26T15:23:43","date_gmt":"2021-05-26T13:23:43","guid":{"rendered":"https:\/\/forflukesake.co.za\/wp\/?p=3288"},"modified":"2021-05-26T15:23:50","modified_gmt":"2021-05-26T13:23:50","slug":"powershell-learning-to-read","status":"publish","type":"post","link":"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/","title":{"rendered":"Powershell: Learning to read"},"content":{"rendered":"\n<p>Over the last few years, I have been using PowerShell to assist in getting a lot of my day-to-day work done. This is especially more so since the environments IT works in are growing and having scripts do the work is much faster than using the GUI. The frustrating bit is I learn PowerShell based on what I read other IT professionals have done, I modify this for my needs at that time. But when I want to try something new for another task I get errors. These Errors are either Syntax errors or Parsing information that is not understood by the following command-let which in turn takes time to figure out what I am doing wrong.<\/p>\n\n\n\n<p>Thus it is time to spend some time and really gets to learn PowerShell. PowerShell is big and ties into many out-of-the-box applications within Microsoft. It has grown so far as to have 3rd party applications use PowerShell to manage their application\\services.<\/p>\n\n\n\n<h2 class=\"has-text-align-center wp-block-heading\">What is Powershell?<\/h2>\n\n\n\n<p>PowerShell is a Modern command Shell that includes features from other popular shells.  PowerShell is object Oriented meaning that it consists of Class and Object and can be used to simply gather information or configure systems based on a current environment\\system state. It allows for bulk automation of management of Systems.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<h3 class=\"has-text-align-center wp-block-heading\">Class and Object<\/h3>\n\n\n\n<p>A class is a blueprint that is used when creating an Object. An Object is the specific details you receive back. <br><br>A simple example would be, All computers have a Serial Number which it can be identified by. We can call this Class <strong>PC_Information<\/strong>. When referring to a specific Computer you would get a Serial Number off <strong>123456<\/strong>. This can be seen as the Object. If the <strong>PC_Information<\/strong> Class had a property call <strong>Make<\/strong>, the Object would have the same Property but the value would be specific to that Workstation.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<h2 class=\"has-text-align-center wp-block-heading\">Basics of the Language<\/h2>\n\n\n\n<p class=\"has-text-align-center\">PowerShell consists of four sections. At its basic level it really only needs two of these Sections the Verb-Noun, combined it is known as a <strong>commandlet<\/strong>. It is case-insensitive, you can write it in all caps or all lower case, the output will be the same. PowerShell is a Natural Language meaning it is easily understandable for human reading. The four sections are as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Verb<ul><li>A word that indicates an action or a state of a condition<\/li><li>Example: Get, New, Set<\/li><li>A list of Verbs can be found on Microsoft Site: <a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/scripting\/developer\/cmdlet\/approved-verbs-for-windows-powershell-commands?view=powershell-7.1\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Here<\/a><\/li><li><span class=\"has-inline-color has-vivid-red-color\">Required to run a Query<\/span><\/li><\/ul><\/li><li>Noun<ul><li>A word that Names Something<\/li><li>The object things we are going to do something to or ask questions about<\/li><li>Example: Service, Process, Alias, ChildItem<\/li><li>When in doubt most nouns will be in a singular format, not plural.<\/li><li><span class=\"has-inline-color has-vivid-red-color\">Required to run a Query<\/span><\/li><\/ul><\/li><li>Parameter Name<ul><li>A named variable passed into a commandlet that changes the output given<\/li><li>A word naming and attribute of a Noun (An Adjective)<\/li><\/ul><\/li><li>Parameter Argument String<ul><li>The Value the Parameter will be measured against to get the required Output<\/li><li>Argument string gets more descriptive. Can use Wildcards, spelling.<\/li><\/ul><\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p>The output will give Property Names with Property Values which is not necessarily all the properties and can be expanded on. This can be explored future with the commandlet: <span class=\"has-inline-color has-vivid-cyan-blue-color\">Get-Member<\/span><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"787\" height=\"343\" data-attachment-id=\"3317\" data-permalink=\"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/image-29-4\/\" data-orig-file=\"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-29.png\" data-orig-size=\"787,343\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-29\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-29.png\" src=\"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-29.png\" alt=\"\" class=\"wp-image-3317\" srcset=\"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-29.png 787w, https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-29-300x131.png 300w, https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-29-768x335.png 768w\" sizes=\"auto, (max-width: 787px) 100vw, 787px\" \/><\/figure><\/div>\n\n\n\n<p>Lets run through an Example quickly. If you open PowerShell (In Admin Mode) you can run two queries.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Query 1: <span class=\"has-inline-color has-luminous-vivid-orange-color\">Get-Service<\/span><br>This will give you a complete list of current services running on the system you are working on. <span class=\"has-inline-color has-vivid-cyan-blue-color\">Get-Service<\/span> is the bare minimum requirement to start getting information back in PowerShell and consist of only the verb-noun (the Commandlet).<\/p>\n\n\n\n<p>Query 2: <span class=\"has-inline-color has-luminous-vivid-orange-color\">Get-Service <\/span><span class=\"has-inline-color has-cyan-bluish-gray-color\">-DisplayName<\/span> <span class=\"has-inline-color has-vivid-green-cyan-color\">&#8220;*Win*&#8221;<\/span><br>This will give you a complete list of current services running on the system where the Display Name contains <span class=\"has-inline-color has-vivid-green-cyan-color\">*Win*<\/span> in the Property value.<\/p>\n\n\n\n<h4 class=\"has-text-align-center wp-block-heading\">Example cmdlet with all four Sections<\/h4>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3300\" data-permalink=\"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/image-28-4\/\" data-orig-file=\"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-28.png\" data-orig-size=\"414,163\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-28\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-28.png\" src=\"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-28.png\" alt=\"\" class=\"wp-image-3300\" width=\"621\" height=\"245\" srcset=\"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-28.png 414w, https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-28-300x118.png 300w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/figure><\/div>\n\n\n\n<p>This is the bare minimum you need to know to run a query in PowerShell. All commandlets consist of Verb-Noun. You can use it with or without parameters. All outputs are Property Name and Property Value.<\/p>\n\n\n\n<h2 class=\"has-text-align-center wp-block-heading\">Make PowerShell easier<\/h2>\n\n\n\n<p>Even though the above mentioned is all you need to run a command in PowerShell, it has taken a step future to make is easier to get more out of the Shell. <\/p>\n\n\n\n<h3 class=\"has-text-align-center wp-block-heading\">Tab-Key<\/h3>\n\n\n\n<p>When typing in PS you can simply press the Tab key mid typing and PS will complete the cmdlet for you based on the first avaialble cmdlet that matches the spelling already typed. Notice that even thought PS is Case insensative it will complete the cmdlet in Sentance Case. Which Means it will make it easier to read.<\/p>\n\n\n\n<h3 class=\"has-text-align-center wp-block-heading\">| Pipe Operator |<\/h3>\n\n\n\n<p>The Pipe Operator allows you to put the output from one command and pass it onto the next command in the Line.<br>The output from one command becomes the input for the next command. This allows you to easily pass information onto the next command without having to go through various lines of Script. There is no set limit of how many times the output can be passed on but there is an order in which it is passed on from one command to another.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"249\" data-attachment-id=\"3337\" data-permalink=\"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/image-30-2\/\" data-orig-file=\"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-30.png\" data-orig-size=\"1254,305\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-30\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-30-1024x249.png\" src=\"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-30-1024x249.png\" alt=\"\" class=\"wp-image-3337\" srcset=\"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-30-1024x249.png 1024w, https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-30-300x73.png 300w, https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-30-768x187.png 768w, https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-30.png 1254w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"has-text-align-center wp-block-heading\">Aliases<\/h3>\n\n\n\n<p>When working with windows Command Prompt, I have a fair amount of commands that I know how it works. It has been imprinted within me over the years. Moving to PS I don&#8217;t need to relearn the commands for the shell. I can simply continue to use them. These are set up as Aliases that correspond back to the other shell used in previous versions of other Operating systems from Mac, Windows, and Linux. The best Example would be <strong>DIR<\/strong> would have the same output as <span class=\"has-inline-color has-vivid-cyan-blue-color\">Get-ChildItem<\/span>.<\/p>\n\n\n\n<p>Like everything, there are some exceptions to the rule but for the most part, the alias does not give any issues. As Example. If you use the cmdlet <span class=\"has-inline-color has-vivid-cyan-blue-color\">Get-Help DIR<\/span> ti will give you the Helpfile for <span class=\"has-inline-color has-vivid-cyan-blue-color\">Get-ChildItem<\/span> as the alias is set and working fine. But doing the same with <span class=\"has-inline-color has-vivid-cyan-blue-color\">get-Help ping<\/span> will give you a result of various Mapping Commands. Even though <strong>ping<\/strong> will still work and you don&#8217;t need to use the PS command. There are some commands that the Alias does not correspond to. Note the Ping Equivalent in PS is <span class=\"has-inline-color has-vivid-cyan-blue-color\">Test-NetConnection<\/span>. <br><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the last few years, I have been using PowerShell to assist in getting a lot of my day-to-day work done. This is especially more so since the environments IT works in are growing and having scripts do the work <a href=\"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_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}},"categories":[201,203,126,18],"tags":[188,27,264,265,29,261,255,266],"class_list":["post-3288","post","type-post","status-publish","format-standard","hentry","category-coding","category-command-line","category-how-to","category-power-shell","tag-ffs","tag-forflukesake","tag-aliases","tag-get-childitem","tag-get-member","tag-learning","tag-powershell","tag-test-netconnection"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Powershell: Learning to read &#187; For Fluk3 Sake<\/title>\n<meta name=\"description\" content=\"Over the years I have been working with PowerShell but it is time to put in some effort and really learn to get the most out of PS.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Powershell: Learning to read &#187; For Fluk3 Sake\" \/>\n<meta property=\"og:description\" content=\"Over the years I have been working with PowerShell but it is time to put in some effort and really learn to get the most out of PS.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/\" \/>\n<meta property=\"og:site_name\" content=\"For Fluk3 Sake\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-26T13:23:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-26T13:23:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-29.png\" \/>\n<meta name=\"author\" content=\"Fluk3\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@F1uk31\" \/>\n<meta name=\"twitter:site\" content=\"@F1uk31\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fluk3\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/3288\\\/powershell-learning-to-read\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/3288\\\/powershell-learning-to-read\\\/\"},\"author\":{\"name\":\"Fluk3\",\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/#\\\/schema\\\/person\\\/806db9f6184fe1af5af378472b5fb2e8\"},\"headline\":\"Powershell: Learning to read\",\"datePublished\":\"2021-05-26T13:23:43+00:00\",\"dateModified\":\"2021-05-26T13:23:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/3288\\\/powershell-learning-to-read\\\/\"},\"wordCount\":1033,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/#\\\/schema\\\/person\\\/806db9f6184fe1af5af378472b5fb2e8\"},\"image\":{\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/3288\\\/powershell-learning-to-read\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/image-29.png\",\"keywords\":[\"#FFS\",\"#ForFlukeSake\",\"Aliases\",\"Get-ChildItem\",\"Get-Member\",\"Learning\",\"PowerShell\",\"Test-NetConnection\"],\"articleSection\":[\"Coding\",\"Command-Line\",\"How To\",\"Power Shell\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/3288\\\/powershell-learning-to-read\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/3288\\\/powershell-learning-to-read\\\/\",\"url\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/3288\\\/powershell-learning-to-read\\\/\",\"name\":\"Powershell: Learning to read &#187; For Fluk3 Sake\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/3288\\\/powershell-learning-to-read\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/3288\\\/powershell-learning-to-read\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/image-29.png\",\"datePublished\":\"2021-05-26T13:23:43+00:00\",\"dateModified\":\"2021-05-26T13:23:50+00:00\",\"description\":\"Over the years I have been working with PowerShell but it is time to put in some effort and really learn to get the most out of PS.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/3288\\\/powershell-learning-to-read\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/3288\\\/powershell-learning-to-read\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/3288\\\/powershell-learning-to-read\\\/#primaryimage\",\"url\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/image-29.png\",\"contentUrl\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/image-29.png\",\"width\":787,\"height\":343},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/3288\\\/powershell-learning-to-read\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Powershell: Learning to read\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/#website\",\"url\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/\",\"name\":\"For Fluk3 Sake\",\"description\":\"You don&#039;t need a degree in computers to do it\",\"publisher\":{\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/#\\\/schema\\\/person\\\/806db9f6184fe1af5af378472b5fb2e8\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/#\\\/schema\\\/person\\\/806db9f6184fe1af5af378472b5fb2e8\",\"name\":\"Fluk3\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/wp-content\\\/uploads\\\/2018\\\/09\\\/cropped-Fluk3-1.png\",\"url\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/wp-content\\\/uploads\\\/2018\\\/09\\\/cropped-Fluk3-1.png\",\"contentUrl\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/wp-content\\\/uploads\\\/2018\\\/09\\\/cropped-Fluk3-1.png\",\"width\":696,\"height\":363,\"caption\":\"Fluk3\"},\"logo\":{\"@id\":\"https:\\\/\\\/forflukesake.co.za\\\/wp\\\/wp-content\\\/uploads\\\/2018\\\/09\\\/cropped-Fluk3-1.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Powershell: Learning to read &#187; For Fluk3 Sake","description":"Over the years I have been working with PowerShell but it is time to put in some effort and really learn to get the most out of PS.","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:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/","og_locale":"en_US","og_type":"article","og_title":"Powershell: Learning to read &#187; For Fluk3 Sake","og_description":"Over the years I have been working with PowerShell but it is time to put in some effort and really learn to get the most out of PS.","og_url":"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/","og_site_name":"For Fluk3 Sake","article_published_time":"2021-05-26T13:23:43+00:00","article_modified_time":"2021-05-26T13:23:50+00:00","og_image":[{"url":"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-29.png","type":"","width":"","height":""}],"author":"Fluk3","twitter_card":"summary_large_image","twitter_creator":"@F1uk31","twitter_site":"@F1uk31","twitter_misc":{"Written by":"Fluk3","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/#article","isPartOf":{"@id":"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/"},"author":{"name":"Fluk3","@id":"https:\/\/forflukesake.co.za\/wp\/#\/schema\/person\/806db9f6184fe1af5af378472b5fb2e8"},"headline":"Powershell: Learning to read","datePublished":"2021-05-26T13:23:43+00:00","dateModified":"2021-05-26T13:23:50+00:00","mainEntityOfPage":{"@id":"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/"},"wordCount":1033,"commentCount":0,"publisher":{"@id":"https:\/\/forflukesake.co.za\/wp\/#\/schema\/person\/806db9f6184fe1af5af378472b5fb2e8"},"image":{"@id":"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/#primaryimage"},"thumbnailUrl":"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-29.png","keywords":["#FFS","#ForFlukeSake","Aliases","Get-ChildItem","Get-Member","Learning","PowerShell","Test-NetConnection"],"articleSection":["Coding","Command-Line","How To","Power Shell"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/","url":"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/","name":"Powershell: Learning to read &#187; For Fluk3 Sake","isPartOf":{"@id":"https:\/\/forflukesake.co.za\/wp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/#primaryimage"},"image":{"@id":"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/#primaryimage"},"thumbnailUrl":"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-29.png","datePublished":"2021-05-26T13:23:43+00:00","dateModified":"2021-05-26T13:23:50+00:00","description":"Over the years I have been working with PowerShell but it is time to put in some effort and really learn to get the most out of PS.","breadcrumb":{"@id":"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/#primaryimage","url":"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-29.png","contentUrl":"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/05\/image-29.png","width":787,"height":343},{"@type":"BreadcrumbList","@id":"https:\/\/forflukesake.co.za\/wp\/3288\/powershell-learning-to-read\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/forflukesake.co.za\/wp\/"},{"@type":"ListItem","position":2,"name":"Powershell: Learning to read"}]},{"@type":"WebSite","@id":"https:\/\/forflukesake.co.za\/wp\/#website","url":"https:\/\/forflukesake.co.za\/wp\/","name":"For Fluk3 Sake","description":"You don&#039;t need a degree in computers to do it","publisher":{"@id":"https:\/\/forflukesake.co.za\/wp\/#\/schema\/person\/806db9f6184fe1af5af378472b5fb2e8"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/forflukesake.co.za\/wp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/forflukesake.co.za\/wp\/#\/schema\/person\/806db9f6184fe1af5af378472b5fb2e8","name":"Fluk3","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2018\/09\/cropped-Fluk3-1.png","url":"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2018\/09\/cropped-Fluk3-1.png","contentUrl":"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2018\/09\/cropped-Fluk3-1.png","width":696,"height":363,"caption":"Fluk3"},"logo":{"@id":"https:\/\/forflukesake.co.za\/wp\/wp-content\/uploads\/2018\/09\/cropped-Fluk3-1.png"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/patsl4-R2","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":4720,"url":"https:\/\/forflukesake.co.za\/wp\/4720\/find-the-oldest-email-in-an-exchange-mailbox\/","url_meta":{"origin":3288,"position":0},"title":"Find the Oldest Email in an Exchange Mailbox","author":"Fluk3","date":"2023-10-04","format":false,"excerpt":"When managing email systems, there are times when you need to identify the oldest email in a mailbox. This information is crucial for making informed decisions, especially when implementing Exchange Retention Policies and determining which emails will be deleted. In this tutorial, we will guide you through the process of\u2026","rel":"","context":"In &quot;Cloud Computing&quot;","block_context":{"text":"Cloud Computing","link":"https:\/\/forflukesake.co.za\/wp\/category\/cloud-computing\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4742,"url":"https:\/\/forflukesake.co.za\/wp\/4742\/file-and-folder-information-using-powershell\/","url_meta":{"origin":3288,"position":1},"title":"File and Folder Information Using PowerShell","author":"Fluk3","date":"2023-10-13","format":false,"excerpt":"If you're looking to catalog the files and folders in a specific directory and its subfolders, a PowerShell script can be a powerful tool. In this tutorial, we'll guide you through creating and using a PowerShell script to log detailed information about files and folders in your chosen directory. Prerequisites\u2026","rel":"","context":"In &quot;Coding&quot;","block_context":{"text":"Coding","link":"https:\/\/forflukesake.co.za\/wp\/category\/coding\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4625,"url":"https:\/\/forflukesake.co.za\/wp\/4625\/how-to-sign-out-all-disconnected-rdp-sessions-using-powershell\/","url_meta":{"origin":3288,"position":2},"title":"How to sign out all disconnected RDP sessions using PowerShell","author":"Fluk3","date":"2023-04-04","format":false,"excerpt":"Introduction Remote Desktop Protocol (RDP) is a widely-used technology that allows users to connect to remote computers over the network. However, if RDP sessions are not disconnected properly, they can accumulate on the server and take up valuable resources. In this article, we will show you how to use PowerShell\u2026","rel":"","context":"In &quot;Coding&quot;","block_context":{"text":"Coding","link":"https:\/\/forflukesake.co.za\/wp\/category\/coding\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4562,"url":"https:\/\/forflukesake.co.za\/wp\/4562\/identifying-mailboxes-with-forwarding-enabled-in-exchange-online-with-powershell\/","url_meta":{"origin":3288,"position":3},"title":"Identifying Mailboxes with Forwarding Enabled in Exchange Online with PowerShell","author":"Fluk3","date":"2023-03-02","format":false,"excerpt":"One common task that administrators may need to perform is identifying mailboxes that have forwarding enabled. This can be done using a PowerShell script, which we will explain in this \"How to\" article. We will cover the purpose of the script and explain each part of the script so you\u2026","rel":"","context":"In &quot;Coding&quot;","block_context":{"text":"Coding","link":"https:\/\/forflukesake.co.za\/wp\/category\/coding\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4436,"url":"https:\/\/forflukesake.co.za\/wp\/4436\/how-to-find-the-last-few-times-a-windows-pc-was-rebooted\/","url_meta":{"origin":3288,"position":4},"title":"How to Find the Last few Times a Windows PC was Rebooted","author":"Fluk3","date":"2023-02-14","format":false,"excerpt":"When troubleshooting a Windows 10 PC, it can be helpful to know when the computer was last rebooted. Knowing this information can help identify potential causes of issues and determine if updates or changes were recently installed. In this article, we'll show you how to find the last 5 times\u2026","rel":"","context":"In &quot;Coding&quot;","block_context":{"text":"Coding","link":"https:\/\/forflukesake.co.za\/wp\/category\/coding\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/forflukesake.co.za\/wp\/wp-content\/uploads\/2023\/02\/image-4.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/forflukesake.co.za\/wp\/wp-content\/uploads\/2023\/02\/image-4.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/forflukesake.co.za\/wp\/wp-content\/uploads\/2023\/02\/image-4.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/forflukesake.co.za\/wp\/wp-content\/uploads\/2023\/02\/image-4.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":3492,"url":"https:\/\/forflukesake.co.za\/wp\/3492\/connect-to-exchange-online-powershell-with-mfa\/","url_meta":{"origin":3288,"position":5},"title":"Connect to Exchange Online PowerShell with MFA","author":"Fluk3","date":"2021-08-23","format":false,"excerpt":"Connecting to Microsoft Exchange Online is very straightforward if you remember the steps. This is just a Quick Step-by-step on how to connect after the initial configurations were done. If you have not connected to EXO before I suggest you work through the below Articles and install EXO V2 EXO\u2026","rel":"","context":"In &quot;Cloud Computing&quot;","block_context":{"text":"Cloud Computing","link":"https:\/\/forflukesake.co.za\/wp\/category\/cloud-computing\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/forflukesake.co.za\/wp\/wp-content\/uploads\/2021\/08\/3-2.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/forflukesake.co.za\/wp\/wp-json\/wp\/v2\/posts\/3288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/forflukesake.co.za\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/forflukesake.co.za\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/forflukesake.co.za\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/forflukesake.co.za\/wp\/wp-json\/wp\/v2\/comments?post=3288"}],"version-history":[{"count":0,"href":"https:\/\/forflukesake.co.za\/wp\/wp-json\/wp\/v2\/posts\/3288\/revisions"}],"wp:attachment":[{"href":"https:\/\/forflukesake.co.za\/wp\/wp-json\/wp\/v2\/media?parent=3288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/forflukesake.co.za\/wp\/wp-json\/wp\/v2\/categories?post=3288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/forflukesake.co.za\/wp\/wp-json\/wp\/v2\/tags?post=3288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}