{"id":1404,"date":"2020-05-25T08:00:30","date_gmt":"2020-05-25T14:00:30","guid":{"rendered":"https:\/\/practicalpowershell.com\/?p=1404"},"modified":"2020-06-07T16:35:43","modified_gmt":"2020-06-07T22:35:43","slug":"handling-wrong-answers","status":"publish","type":"post","link":"https:\/\/practicalpowershell.com\/handling-wrong-answers\/","title":{"rendered":"Handling Wrong Answers"},"content":{"rendered":"<p><BR>If a script contains a series of questions for someone to enter answers for, how do we perform a sort of error handling on the entered responses?  Do we just ignore it and have the script chug along to the next task hoping no issues are created by missing, incomplete or wrong answers?  Or do we try to control the chaos by looping back to the question and letting the user know that what they entered was not correct?  The latter is of course the best answer, but it may not always be the answer if we don&#8217;t have a control set, or known values, that we are expecting.  For the below code sample, we will only be using a controlled set of data to illustrate the issue and then illustrate the solution.<\/p>\n<h3>Asking a Question and the Response?<\/h3>\n<p>In the below code samples we will ask a series of questions of the script operator.  The first sample just hopes the operator enters the correct data and that the script will function whereas the last code sample will account for the answers and provide feedback to the end user when it fails.<BR><br \/>\n<I>No Answer Checking<\/I><BR><br \/>\nIn this code below, we are trying to install the correct version of .NET on a server.  The first line asks the operator which version of .NET they wish to install.  If they enter the correct number, then .NET will be installed.  However, if they do not, then the script will simply ignore the data (no matches) and go back to the main menu.  First is the code and after the code is a screenshot of what happens when the correct answer is provided and an incorrect answer is provided:<br \/>\n[sourcecode language=&#8221;powershell&#8221; collapse=&#8217;true&#8217;]<br \/>\n$Decision = Read-Host -Prompt &quot;Which version of .Net do you want to install? [4.7, 4.7.1, 4.7.2 or 4.8?] &quot;<br \/>\nIf ($Decision -eq &#039;4.7&#039;) {<br \/>\n    If ($DotNetVersion -lt &#039;460805&#039;) {<br \/>\n        Install-NET470<br \/>\n        Write-Host &#039;Please make sure to reboot your server now.&#039; -ForegroundColor Yellow<br \/>\n    } else {<br \/>\n        Write-Host &#039;This version of .NET is too low for this server.&#039; -ForegroundColor Yellow<br \/>\n    }<br \/>\n}<br \/>\nIf ($Decision -eq &#039;4.7.1&#039;) {<br \/>\n    If ($DotNetVersion -lt &#039;461310&#039;) {<br \/>\n        Install-NET471<br \/>\n        Write-Host &#039;Please make sure to reboot your server now.&#039; -ForegroundColor Yellow<br \/>\n    } else {<br \/>\n        Write-Host &#039;This version of .NET is too low for this server.&#039; -ForegroundColor Yellow<br \/>\n    }<br \/>\n}<br \/>\nIf ($Decision -eq &#039;4.7.2&#039;) {<br \/>\n    If ($DotNetVersion -lt &#039;461814&#039;) {<br \/>\n        Install-NET472<br \/>\n        Write-Host &#039;Please make sure to reboot your server now.&#039; -ForegroundColor Yellow<br \/>\n    } else {<br \/>\n        Write-Host &#039;&#039;<br \/>\n        Write-Host &#039;This version of .NET is too low for this server.&#039; -ForegroundColor Yellow<br \/>\n    }<br \/>\n}<br \/>\nIf ($Decision -eq &#039;4.8&#039;) {<br \/>\n    If ($DotNetVersion -lt &#039;528049&#039;) {<br \/>\n        Install-NET48<br \/>\n        Write-Host &#039;Please make sure to reboot your server now.&#039; -ForegroundColor Yellow<br \/>\n    } else {<br \/>\n        Write-Host &#039;This version of .NET is too low for this server.&#039; -ForegroundColor Yellow<br \/>\n    }<br \/>\n}<br \/>\n[\/sourcecode]<br \/>\n<a href=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-01.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-01.jpg?resize=640%2C252&#038;ssl=1\" alt=\"\" width=\"640\" height=\"252\" class=\"aligncenter size-large wp-image-1405\" srcset=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-01.jpg?resize=1024%2C403&amp;ssl=1 1024w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-01.jpg?resize=300%2C118&amp;ssl=1 300w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-01.jpg?resize=768%2C302&amp;ssl=1 768w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-01.jpg?resize=600%2C236&amp;ssl=1 600w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-01.jpg?w=1339&amp;ssl=1 1339w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-01.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\n<I>Answer Checking<\/I><BR><br \/>\nNow what if we add some lines, add some checks and provide feedback to a user so that they don&#8217;t waste time with wrong answers?  We can do that with the code provided below.  The sample is the same as above with the addition of a &#8216;Do While&#8217; loop that looks to make sure the answer provided is correct.  If the answer is not one of the ones on the list than an warning message is displayed and we are asked to provide another answer.  Once a correct answer is entered, the script executed the request and then goes back to the main menu:<br \/>\n[sourcecode language=&#8221;powershell&#8221; collapse=&#8217;true&#8217;]<br \/>\nDo {<br \/>\n        $Decision = Read-Host -Prompt &quot;Which version of .Net do you want to install? [4.7, 4.7.1, 4.7.2 or 4.8?  &#039;x&#039; for main menu] &quot;<\/p>\n<p>        If ($Decision -eq &#039;4.7&#039;) {<br \/>\n            $Valid = $True<br \/>\n            If ($DotNetVersion -lt &#039;460805&#039;) {<br \/>\n                Install-NET470<br \/>\n                Write-Host &#039;Please make sure to reboot your server now.&#039; -ForegroundColor Yellow<br \/>\n            } else {<br \/>\n                Write-Host &#039;This version of .NET is too low for this server.&#039; -ForegroundColor Yellow<br \/>\n            }<br \/>\n        }<br \/>\n        If ($Decision -eq &#039;4.7.1&#039;) {<br \/>\n            $Valid = $True<br \/>\n            If ($DotNetVersion -lt &#039;461310&#039;) {<br \/>\n                Install-NET471<br \/>\n                Write-Host &#039;Please make sure to reboot your server now.&#039; -ForegroundColor Yellow<br \/>\n            } else {<br \/>\n                Write-Host &#039;This version of .NET is too low for this server.&#039; -ForegroundColor Yellow<br \/>\n            }<br \/>\n        }<br \/>\n        If ($Decision -eq &#039;4.7.2&#039;) {<br \/>\n            $Valid = $True<br \/>\n            If ($DotNetVersion -lt &#039;461814&#039;) {<br \/>\n                Install-NET472<br \/>\n                Write-Host &#039;Please make sure to reboot your server now.&#039; -ForegroundColor Yellow<br \/>\n            } else {<br \/>\n                Write-Host &#039;This version of .NET is too low for this server.&#039; -ForegroundColor Yellow<br \/>\n            }<br \/>\n        }<br \/>\n        If ($Decision -eq &#039;4.8&#039;) {<br \/>\n            $Valid = $True<br \/>\n            If ($DotNetVersion -lt &#039;528049&#039;) {<br \/>\n                Install-NET48<br \/>\n                Write-Host &#039;Please make sure to reboot your server now.&#039; -ForegroundColor Yellow<br \/>\n            } else {<br \/>\n                Write-Host &#039;This version of .NET is too low for this server.&#039; -ForegroundColor Yellow<br \/>\n            }<br \/>\n        }<br \/>\n        If ($Decision -eq &#039;x&#039;) {<br \/>\n            Write-Host &#039;Exiting .NET installation function &#8230;&#039; -ForegroundColor Yellow<br \/>\n            $Valid = $True<br \/>\n        }<br \/>\n        If (!$Valid) {<br \/>\n            Write-Host &#039;&#039;;;write-host &#039;&#039;;Write-Host &#039; Invalid selection.  Please choose again.&#039; -ForegroundColor Yellow;write-host &#039;&#039;;write-host &#039;&#039;<br \/>\n        }<br \/>\n    } While ($Valid -ne $True)<br \/>\n[\/sourcecode]<br \/>\nWhat we notice is that a successful execution does NOT look different than the code in the first example.  The difference is only when a wrong answer is entered, which is what we were coding for.<BR><br \/>\n<a href=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-02.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-02.jpg?resize=640%2C228&#038;ssl=1\" alt=\"\" width=\"640\" height=\"228\" class=\"aligncenter size-large wp-image-1407\" srcset=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-02.jpg?resize=1024%2C364&amp;ssl=1 1024w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-02.jpg?resize=300%2C107&amp;ssl=1 300w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-02.jpg?resize=768%2C273&amp;ssl=1 768w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-02.jpg?resize=600%2C214&amp;ssl=1 600w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-02.jpg?w=1475&amp;ssl=1 1475w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-02.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<h3>Conclusion<\/h3>\n<p>Providing a way to check for correct answers provides for a better experience overall and ensures that the operator pays attention to the choices.  However, not all scenarios will allow this type of check.  Other options may need to be put in place.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If a script contains a series of questions for someone to enter answers for, how do we perform a sort of error handling on the entered responses? Do we just ignore it and have the script chug along to the next task hoping no issues are created by missing, incomplete or wrong answers? Or do [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rop_custom_images_group":[],"rop_custom_messages_group":[],"rop_publish_now":"initial","rop_publish_now_accounts":[],"rop_publish_now_history":[],"rop_publish_now_status":"pending","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[22],"tags":[],"class_list":["post-1404","post","type-post","status-publish","format-standard","hentry","category-powershell"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Handling Wrong Answers - Practical PowerShell<\/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:\/\/practicalpowershell.com\/handling-wrong-answers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Handling Wrong Answers - Practical PowerShell\" \/>\n<meta property=\"og:description\" content=\"If a script contains a series of questions for someone to enter answers for, how do we perform a sort of error handling on the entered responses? Do we just ignore it and have the script chug along to the next task hoping no issues are created by missing, incomplete or wrong answers? Or do [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/practicalpowershell.com\/handling-wrong-answers\/\" \/>\n<meta property=\"og:site_name\" content=\"Practical PowerShell\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-25T14:00:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-07T22:35:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-01-1024x403.jpg\" \/>\n<meta name=\"author\" content=\"damian\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"damian\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/handling-wrong-answers\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/handling-wrong-answers\\\/\"},\"author\":{\"name\":\"damian\",\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/#\\\/schema\\\/person\\\/4d0733c81966e744aabbb49f56d64deb\"},\"headline\":\"Handling Wrong Answers\",\"datePublished\":\"2020-05-25T14:00:30+00:00\",\"dateModified\":\"2020-06-07T22:35:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/handling-wrong-answers\\\/\"},\"wordCount\":819,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/#\\\/schema\\\/person\\\/4d0733c81966e744aabbb49f56d64deb\"},\"image\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/handling-wrong-answers\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/practicalpowershell.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/ErrorNAnswers-01-1024x403.jpg\",\"articleSection\":[\"PowerShell\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/practicalpowershell.com\\\/handling-wrong-answers\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/handling-wrong-answers\\\/\",\"url\":\"https:\\\/\\\/practicalpowershell.com\\\/handling-wrong-answers\\\/\",\"name\":\"Handling Wrong Answers - Practical PowerShell\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/handling-wrong-answers\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/handling-wrong-answers\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/practicalpowershell.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/ErrorNAnswers-01-1024x403.jpg\",\"datePublished\":\"2020-05-25T14:00:30+00:00\",\"dateModified\":\"2020-06-07T22:35:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/handling-wrong-answers\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/practicalpowershell.com\\\/handling-wrong-answers\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/handling-wrong-answers\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/practicalpowershell.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/ErrorNAnswers-01.jpg?fit=1339%2C527&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/practicalpowershell.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/ErrorNAnswers-01.jpg?fit=1339%2C527&ssl=1\",\"width\":1339,\"height\":527},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/handling-wrong-answers\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/practicalpowershell.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Handling Wrong Answers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/#website\",\"url\":\"https:\\\/\\\/practicalpowershell.com\\\/\",\"name\":\"Practical PowerShell\",\"description\":\"PowerShell books written by experts\",\"publisher\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/#\\\/schema\\\/person\\\/4d0733c81966e744aabbb49f56d64deb\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/practicalpowershell.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/#\\\/schema\\\/person\\\/4d0733c81966e744aabbb49f56d64deb\",\"name\":\"damian\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d5a8cc64a5aa27558a897b108e3be1a89859511a3fd26176dac292f26e7a4ae4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d5a8cc64a5aa27558a897b108e3be1a89859511a3fd26176dac292f26e7a4ae4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d5a8cc64a5aa27558a897b108e3be1a89859511a3fd26176dac292f26e7a4ae4?s=96&d=mm&r=g\",\"caption\":\"damian\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d5a8cc64a5aa27558a897b108e3be1a89859511a3fd26176dac292f26e7a4ae4?s=96&d=mm&r=g\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Handling Wrong Answers - Practical PowerShell","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:\/\/practicalpowershell.com\/handling-wrong-answers\/","og_locale":"en_US","og_type":"article","og_title":"Handling Wrong Answers - Practical PowerShell","og_description":"If a script contains a series of questions for someone to enter answers for, how do we perform a sort of error handling on the entered responses? Do we just ignore it and have the script chug along to the next task hoping no issues are created by missing, incomplete or wrong answers? Or do [&hellip;]","og_url":"https:\/\/practicalpowershell.com\/handling-wrong-answers\/","og_site_name":"Practical PowerShell","article_published_time":"2020-05-25T14:00:30+00:00","article_modified_time":"2020-06-07T22:35:43+00:00","og_image":[{"url":"https:\/\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-01-1024x403.jpg","type":"","width":"","height":""}],"author":"damian","twitter_card":"summary_large_image","twitter_misc":{"Written by":"damian","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/practicalpowershell.com\/handling-wrong-answers\/#article","isPartOf":{"@id":"https:\/\/practicalpowershell.com\/handling-wrong-answers\/"},"author":{"name":"damian","@id":"https:\/\/practicalpowershell.com\/#\/schema\/person\/4d0733c81966e744aabbb49f56d64deb"},"headline":"Handling Wrong Answers","datePublished":"2020-05-25T14:00:30+00:00","dateModified":"2020-06-07T22:35:43+00:00","mainEntityOfPage":{"@id":"https:\/\/practicalpowershell.com\/handling-wrong-answers\/"},"wordCount":819,"commentCount":0,"publisher":{"@id":"https:\/\/practicalpowershell.com\/#\/schema\/person\/4d0733c81966e744aabbb49f56d64deb"},"image":{"@id":"https:\/\/practicalpowershell.com\/handling-wrong-answers\/#primaryimage"},"thumbnailUrl":"https:\/\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-01-1024x403.jpg","articleSection":["PowerShell"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/practicalpowershell.com\/handling-wrong-answers\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/practicalpowershell.com\/handling-wrong-answers\/","url":"https:\/\/practicalpowershell.com\/handling-wrong-answers\/","name":"Handling Wrong Answers - Practical PowerShell","isPartOf":{"@id":"https:\/\/practicalpowershell.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/practicalpowershell.com\/handling-wrong-answers\/#primaryimage"},"image":{"@id":"https:\/\/practicalpowershell.com\/handling-wrong-answers\/#primaryimage"},"thumbnailUrl":"https:\/\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-01-1024x403.jpg","datePublished":"2020-05-25T14:00:30+00:00","dateModified":"2020-06-07T22:35:43+00:00","breadcrumb":{"@id":"https:\/\/practicalpowershell.com\/handling-wrong-answers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/practicalpowershell.com\/handling-wrong-answers\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/practicalpowershell.com\/handling-wrong-answers\/#primaryimage","url":"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-01.jpg?fit=1339%2C527&ssl=1","contentUrl":"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/05\/ErrorNAnswers-01.jpg?fit=1339%2C527&ssl=1","width":1339,"height":527},{"@type":"BreadcrumbList","@id":"https:\/\/practicalpowershell.com\/handling-wrong-answers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/practicalpowershell.com\/"},{"@type":"ListItem","position":2,"name":"Handling Wrong Answers"}]},{"@type":"WebSite","@id":"https:\/\/practicalpowershell.com\/#website","url":"https:\/\/practicalpowershell.com\/","name":"Practical PowerShell","description":"PowerShell books written by experts","publisher":{"@id":"https:\/\/practicalpowershell.com\/#\/schema\/person\/4d0733c81966e744aabbb49f56d64deb"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/practicalpowershell.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/practicalpowershell.com\/#\/schema\/person\/4d0733c81966e744aabbb49f56d64deb","name":"damian","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d5a8cc64a5aa27558a897b108e3be1a89859511a3fd26176dac292f26e7a4ae4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d5a8cc64a5aa27558a897b108e3be1a89859511a3fd26176dac292f26e7a4ae4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d5a8cc64a5aa27558a897b108e3be1a89859511a3fd26176dac292f26e7a4ae4?s=96&d=mm&r=g","caption":"damian"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/d5a8cc64a5aa27558a897b108e3be1a89859511a3fd26176dac292f26e7a4ae4?s=96&d=mm&r=g"}}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/practicalpowershell.com\/wp-json\/wp\/v2\/posts\/1404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/practicalpowershell.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/practicalpowershell.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/practicalpowershell.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/practicalpowershell.com\/wp-json\/wp\/v2\/comments?post=1404"}],"version-history":[{"count":3,"href":"https:\/\/practicalpowershell.com\/wp-json\/wp\/v2\/posts\/1404\/revisions"}],"predecessor-version":[{"id":1409,"href":"https:\/\/practicalpowershell.com\/wp-json\/wp\/v2\/posts\/1404\/revisions\/1409"}],"wp:attachment":[{"href":"https:\/\/practicalpowershell.com\/wp-json\/wp\/v2\/media?parent=1404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/practicalpowershell.com\/wp-json\/wp\/v2\/categories?post=1404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/practicalpowershell.com\/wp-json\/wp\/v2\/tags?post=1404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}