{"id":521,"date":"2018-10-15T08:00:15","date_gmt":"2018-10-15T14:00:15","guid":{"rendered":"https:\/\/practicalpowershell.com\/?p=521"},"modified":"2020-03-14T11:12:43","modified_gmt":"2020-03-14T17:12:43","slug":"need-input-read-host","status":"publish","type":"post","link":"https:\/\/practicalpowershell.com\/need-input-read-host\/","title":{"rendered":"Need Input? Read-Host"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/NeedInput.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/NeedInput.png?resize=150%2C150&#038;ssl=1\" alt=\"\" width=\"150\" height=\"150\" class=\"alignleft size-thumbnail wp-image-522\" srcset=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/NeedInput.png?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/NeedInput.png?resize=100%2C100&amp;ssl=1 100w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a>PowerShell scripts can perform all sorts of functions. They can gather information, make reports, change settings and prepare servers for app installs. The scripts can be run as scheduled tasks, be triggered by events or run at a PowerShell console manually. Some scripts do not need input. But what if your script does? How can your PowerShell script prompt for input?<BR><br \/>\n[sourcecode language=&#8221;powershell&#8221;]<br \/>\nRead-Host<br \/>\n[\/sourcecode]<br \/>\nBelow are some use cases as well as how to use the relatively few parameters provided by the cmdlet:<BR><br \/>\n<em>Password prompt and secure storage<\/em><BR><br \/>\n<u>Method One<\/u><BR><br \/>\nFor this method, a sentence will be written to the PowerShell console with Write-Host to be followed-up with a Read-Host statement.<br \/>\n[sourcecode language=&#8221;powershell&#8221;]<br \/>\nWrite-host &quot;Enter O365 Login Name (UPN): &quot; -ForegroundColor White -NoNewLine<br \/>\n$SMTPusername = Read-Host<br \/>\n[\/sourcecode]<br \/>\nNotice that the Write-Host has a &#8216;-NoNewLine&#8217; at the end, this means that user input will occur right after the question is asked:<br \/>\n<a href=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost01.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost01.jpg?resize=504%2C106&#038;ssl=1\" alt=\"\" width=\"504\" height=\"106\" class=\"aligncenter size-full wp-image-523\" srcset=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost01.jpg?w=504&amp;ssl=1 504w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost01.jpg?resize=300%2C63&amp;ssl=1 300w\" sizes=\"auto, (max-width: 504px) 100vw, 504px\" \/><\/a><br \/>\nThe user name is also now stored in a variable to be used later in a script. The value is also stored as a string.<BR><br \/>\n<u>Method two<\/u><BR><br \/>\nFor this method, we need to capture a password to be used to pass along to another system for a connection or access to a particular workload. We can use Read-Host to securely store this password. We need to apply a switch &#8216;AsSecureString&#8217;, but it is possible. So we can use code like this:<br \/>\n[sourcecode language=&#8221;powershell&#8221;]<br \/>\nWrite-host &quot;Please enter a password for the admin account: &quot; -NoNewLine -ForegroundColor Yellow<br \/>\n$Pwd = Read-Host -AsSecureString<br \/>\n[\/sourcecode]<br \/>\nJust the same as Method one, we can enter the password on the same line as the question prompt in the console. However, notice that the when characters are typed, they are replaced with an asterix:<br \/>\n<a href=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost02.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost02.jpg?resize=574%2C110&#038;ssl=1\" alt=\"\" width=\"574\" height=\"110\" class=\"aligncenter size-full wp-image-524\" srcset=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost02.jpg?w=574&amp;ssl=1 574w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost02.jpg?resize=300%2C57&amp;ssl=1 300w\" sizes=\"auto, (max-width: 574px) 100vw, 574px\" \/><\/a><br \/>\nNow the password is stored in a secure variable, to be retrieved later for some sort of authentication process. <BR><br \/>\n<em>Method Three<\/em><BR><br \/>\nFor this last method, we&#8217;ll ask for a password, but instead of just storing it in a password, we&#8217;ll also write the value to a file as well:<br \/>\n[sourcecode language=&#8221;powershell&#8221;]<br \/>\nRead-Host &quot;Enter Password&quot; -AsSecureString | ConvertFrom-SecureString | Out-File &quot;c:\\Password.txt&quot;<br \/>\n[\/sourcecode]<br \/>\nNotice that we are not storing the initial Read-Host as a variable, but writing it straight to a file:<br \/>\n<a href=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost03.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost03.jpg?resize=282%2C32&#038;ssl=1\" alt=\"\" width=\"282\" height=\"32\" class=\"aligncenter size-full wp-image-525\" \/><\/a><br \/>\nThis then is stored in a file which looks like this:<br \/>\n<a href=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost04.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost04.jpg?resize=640%2C154&#038;ssl=1\" alt=\"\" width=\"640\" height=\"154\" class=\"aligncenter size-full wp-image-526\" srcset=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost04.jpg?w=838&amp;ssl=1 838w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost04.jpg?resize=300%2C72&amp;ssl=1 300w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost04.jpg?resize=768%2C185&amp;ssl=1 768w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost04.jpg?resize=600%2C145&amp;ssl=1 600w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\nNow this file can be pulled into a variable and used by a scheduled script like so:<br \/>\n[sourcecode language=&#8221;powershell&#8221;]<br \/>\n$SMTPpassword = Cat &quot;c:\\Password.txt&quot; | ConvertTo-secureString<br \/>\n[\/sourcecode]<br \/>\nThe downside to this is that this is obviously a security risk. This file should be stored in a secure location and not accessible to other people.<BR><br \/>\n<em>General decision making<\/em><BR><br \/>\nRead-Host can be used as a quick way to have the operator enter a decision or option to have the script perform a specific task. This could be from a menu or just general input needed to feed a particular function.<BR><br \/>\nFor a menu, the operator is provided a few choices like so:<br \/>\n[sourcecode language=&#8221;powershell&#8221;]<br \/>\n$Menu = {<br \/>\nWrite-Host &quot; 1) Install Mailbox Role Prerequisites &#8211; Full OS&quot; -ForegroundColor White<br \/>\nWrite-Host &quot; 2) Install Mailbox Role Prerequisites &#8211; Core OS&quot; -ForegroundColor White<br \/>\nWrite-Host &quot; 3) Install Edge Transport Prerequisites &#8211; Full OS \/ Core OS&quot; -ForegroundColor White<br \/>\nWrite-Host &quot; Select an option.. [1,2 or 3]? &quot; -ForegroundColor White -nonewline<br \/>\n}<br \/>\n$Choice = Read-Host<br \/>\n[\/sourcecode]<br \/>\nThe operator now has a choice of 1,2 or 3 in order to perform some sort of function in the script. <BR><br \/>\n<em>Simplifying the above<\/em><BR><br \/>\nIn a lot of the above examples, we&#8217;ve used Write-Host to prompt for the entry of some operator input. We can simplify this by skipping the Write-Host cmdlet and using the &#8216;-Prompt&#8217; parameter like so:<br \/>\n[sourcecode language=&#8221;powershell&#8221;]<br \/>\nRead-Host -Prompt &quot;Enter your user name here&quot;<br \/>\n[\/sourcecode]<br \/>\n<a href=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost05.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost05.jpg?resize=292%2C34&#038;ssl=1\" alt=\"\" width=\"292\" height=\"34\" class=\"aligncenter size-full wp-image-527\" \/><\/a><br \/>\nOR<br \/>\n[sourcecode language=&#8221;powershell&#8221;]<br \/>\nRead-Host -Prompt &quot;Enter a password&quot; -AsSecureString<br \/>\n[\/sourcecode]<br \/>\n<a href=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost06.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost06.jpg?resize=302%2C32&#038;ssl=1\" alt=\"\" width=\"302\" height=\"32\" class=\"aligncenter size-full wp-image-528\" srcset=\"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost06.jpg?w=302&amp;ssl=1 302w, https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/ReadHost06.jpg?resize=300%2C32&amp;ssl=1 300w\" sizes=\"auto, (max-width: 302px) 100vw, 302px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PowerShell scripts can perform all sorts of functions. They can gather information, make reports, change settings and prepare servers for app installs. The scripts can be run as scheduled tasks, be triggered by events or run at a PowerShell console manually. Some scripts do not need input. But what if your script does? How can [&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":[1],"tags":[],"class_list":["post-521","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Need Input? Read-Host - 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\/need-input-read-host\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Need Input? Read-Host - Practical PowerShell\" \/>\n<meta property=\"og:description\" content=\"PowerShell scripts can perform all sorts of functions. They can gather information, make reports, change settings and prepare servers for app installs. The scripts can be run as scheduled tasks, be triggered by events or run at a PowerShell console manually. Some scripts do not need input. But what if your script does? How can [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/practicalpowershell.com\/need-input-read-host\/\" \/>\n<meta property=\"og:site_name\" content=\"Practical PowerShell\" \/>\n<meta property=\"article:published_time\" content=\"2018-10-15T14:00:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-03-14T17:12:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/NeedInput-150x150.png\" \/>\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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/need-input-read-host\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/need-input-read-host\\\/\"},\"author\":{\"name\":\"damian\",\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/#\\\/schema\\\/person\\\/4d0733c81966e744aabbb49f56d64deb\"},\"headline\":\"Need Input? Read-Host\",\"datePublished\":\"2018-10-15T14:00:15+00:00\",\"dateModified\":\"2020-03-14T17:12:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/need-input-read-host\\\/\"},\"wordCount\":643,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/#\\\/schema\\\/person\\\/4d0733c81966e744aabbb49f56d64deb\"},\"image\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/need-input-read-host\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/practicalpowershell.com\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/NeedInput-150x150.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/practicalpowershell.com\\\/need-input-read-host\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/need-input-read-host\\\/\",\"url\":\"https:\\\/\\\/practicalpowershell.com\\\/need-input-read-host\\\/\",\"name\":\"Need Input? Read-Host - Practical PowerShell\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/need-input-read-host\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/need-input-read-host\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/practicalpowershell.com\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/NeedInput-150x150.png\",\"datePublished\":\"2018-10-15T14:00:15+00:00\",\"dateModified\":\"2020-03-14T17:12:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/need-input-read-host\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/practicalpowershell.com\\\/need-input-read-host\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/need-input-read-host\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/practicalpowershell.com\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/NeedInput.png?fit=236%2C168&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/practicalpowershell.com\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/NeedInput.png?fit=236%2C168&ssl=1\",\"width\":236,\"height\":168},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/practicalpowershell.com\\\/need-input-read-host\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/practicalpowershell.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Need Input? Read-Host\"}]},{\"@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":"Need Input? Read-Host - 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\/need-input-read-host\/","og_locale":"en_US","og_type":"article","og_title":"Need Input? Read-Host - Practical PowerShell","og_description":"PowerShell scripts can perform all sorts of functions. They can gather information, make reports, change settings and prepare servers for app installs. The scripts can be run as scheduled tasks, be triggered by events or run at a PowerShell console manually. Some scripts do not need input. But what if your script does? How can [&hellip;]","og_url":"https:\/\/practicalpowershell.com\/need-input-read-host\/","og_site_name":"Practical PowerShell","article_published_time":"2018-10-15T14:00:15+00:00","article_modified_time":"2020-03-14T17:12:43+00:00","og_image":[{"url":"https:\/\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/NeedInput-150x150.png","type":"","width":"","height":""}],"author":"damian","twitter_card":"summary_large_image","twitter_misc":{"Written by":"damian","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/practicalpowershell.com\/need-input-read-host\/#article","isPartOf":{"@id":"https:\/\/practicalpowershell.com\/need-input-read-host\/"},"author":{"name":"damian","@id":"https:\/\/practicalpowershell.com\/#\/schema\/person\/4d0733c81966e744aabbb49f56d64deb"},"headline":"Need Input? Read-Host","datePublished":"2018-10-15T14:00:15+00:00","dateModified":"2020-03-14T17:12:43+00:00","mainEntityOfPage":{"@id":"https:\/\/practicalpowershell.com\/need-input-read-host\/"},"wordCount":643,"commentCount":0,"publisher":{"@id":"https:\/\/practicalpowershell.com\/#\/schema\/person\/4d0733c81966e744aabbb49f56d64deb"},"image":{"@id":"https:\/\/practicalpowershell.com\/need-input-read-host\/#primaryimage"},"thumbnailUrl":"https:\/\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/NeedInput-150x150.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/practicalpowershell.com\/need-input-read-host\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/practicalpowershell.com\/need-input-read-host\/","url":"https:\/\/practicalpowershell.com\/need-input-read-host\/","name":"Need Input? Read-Host - Practical PowerShell","isPartOf":{"@id":"https:\/\/practicalpowershell.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/practicalpowershell.com\/need-input-read-host\/#primaryimage"},"image":{"@id":"https:\/\/practicalpowershell.com\/need-input-read-host\/#primaryimage"},"thumbnailUrl":"https:\/\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/NeedInput-150x150.png","datePublished":"2018-10-15T14:00:15+00:00","dateModified":"2020-03-14T17:12:43+00:00","breadcrumb":{"@id":"https:\/\/practicalpowershell.com\/need-input-read-host\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/practicalpowershell.com\/need-input-read-host\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/practicalpowershell.com\/need-input-read-host\/#primaryimage","url":"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/NeedInput.png?fit=236%2C168&ssl=1","contentUrl":"https:\/\/i0.wp.com\/practicalpowershell.com\/wp-content\/uploads\/2020\/03\/NeedInput.png?fit=236%2C168&ssl=1","width":236,"height":168},{"@type":"BreadcrumbList","@id":"https:\/\/practicalpowershell.com\/need-input-read-host\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/practicalpowershell.com\/"},{"@type":"ListItem","position":2,"name":"Need Input? Read-Host"}]},{"@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\/521","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=521"}],"version-history":[{"count":1,"href":"https:\/\/practicalpowershell.com\/wp-json\/wp\/v2\/posts\/521\/revisions"}],"predecessor-version":[{"id":529,"href":"https:\/\/practicalpowershell.com\/wp-json\/wp\/v2\/posts\/521\/revisions\/529"}],"wp:attachment":[{"href":"https:\/\/practicalpowershell.com\/wp-json\/wp\/v2\/media?parent=521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/practicalpowershell.com\/wp-json\/wp\/v2\/categories?post=521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/practicalpowershell.com\/wp-json\/wp\/v2\/tags?post=521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}