{"id":237631,"date":"2024-06-18T05:04:26","date_gmt":"2024-06-18T05:04:26","guid":{"rendered":"https:\/\/namso-gen.co\/blog\/?p=237631"},"modified":"2024-06-18T05:04:26","modified_gmt":"2024-06-18T05:04:26","slug":"how-to-display-variable-value-in-powershell","status":"publish","type":"post","link":"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/","title":{"rendered":"How to display variable value in PowerShell?"},"content":{"rendered":"<p>**In PowerShell, you can display the value of a variable by simply typing the variable name preceded by a &#8220;$&#8221; sign. For example, if you have a variable named &#8220;number&#8221; with a value of 10, you can display it by typing $number in the PowerShell console.**<\/p>\n<p>PowerShell is a powerful scripting language that allows you to automate tasks and manage systems more efficiently. Displaying variable values is essential for debugging and monitoring the progress of your scripts. Here&#8217;s how you can do it in PowerShell.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_62 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#1_How_do_I_assign_a_value_to_a_variable_in_PowerShell\" title=\"1. How do I assign a value to a variable in PowerShell?\">1. How do I assign a value to a variable in PowerShell?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#2_Can_I_display_the_value_of_multiple_variables_at_once_in_PowerShell\" title=\"2. Can I display the value of multiple variables at once in PowerShell?\">2. Can I display the value of multiple variables at once in PowerShell?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#3_How_can_I_display_the_value_of_a_variable_in_a_specific_format_in_PowerShell\" title=\"3. How can I display the value of a variable in a specific format in PowerShell?\">3. How can I display the value of a variable in a specific format in PowerShell?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#4_Is_there_a_way_to_display_the_value_of_a_variable_on_a_new_line_in_PowerShell\" title=\"4. Is there a way to display the value of a variable on a new line in PowerShell?\">4. Is there a way to display the value of a variable on a new line in PowerShell?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#5_How_do_I_display_the_value_of_an_array_variable_in_PowerShell\" title=\"5. How do I display the value of an array variable in PowerShell?\">5. How do I display the value of an array variable in PowerShell?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#6_Can_I_display_the_value_of_a_variable_in_a_message_box_in_PowerShell\" title=\"6. Can I display the value of a variable in a message box in PowerShell?\">6. Can I display the value of a variable in a message box in PowerShell?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#7_How_can_I_display_the_value_of_a_variable_with_a_message_in_PowerShell\" title=\"7. How can I display the value of a variable with a message in PowerShell?\">7. How can I display the value of a variable with a message in PowerShell?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#8_Is_there_a_way_to_display_the_value_of_a_variable_only_if_it_meets_a_certain_condition_in_PowerShell\" title=\"8. Is there a way to display the value of a variable only if it meets a certain condition in PowerShell?\">8. Is there a way to display the value of a variable only if it meets a certain condition in PowerShell?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#9_How_do_I_display_the_value_of_a_variable_in_a_table_format_in_PowerShell\" title=\"9. How do I display the value of a variable in a table format in PowerShell?\">9. How do I display the value of a variable in a table format in PowerShell?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#10_Can_I_display_the_value_of_a_variable_in_a_different_color_in_PowerShell\" title=\"10. Can I display the value of a variable in a different color in PowerShell?\">10. Can I display the value of a variable in a different color in PowerShell?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#11_How_can_I_display_the_value_of_a_variable_in_uppercase_or_lowercase_in_PowerShell\" title=\"11. How can I display the value of a variable in uppercase or lowercase in PowerShell?\">11. How can I display the value of a variable in uppercase or lowercase in PowerShell?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#12_Is_there_a_way_to_display_the_value_of_a_variable_without_any_leading_or_trailing_whitespace_in_PowerShell\" title=\"12. Is there a way to display the value of a variable without any leading or trailing whitespace in PowerShell?\">12. Is there a way to display the value of a variable without any leading or trailing whitespace in PowerShell?<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"1_How_do_I_assign_a_value_to_a_variable_in_PowerShell\"><\/span>1. How do I assign a value to a variable in PowerShell?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nTo assign a value to a variable in PowerShell, you can use the &#8220;=&#8221; operator. For example, to assign the value 10 to a variable named &#8220;number&#8221;, you can type $number = 10.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"2_Can_I_display_the_value_of_multiple_variables_at_once_in_PowerShell\"><\/span>2. Can I display the value of multiple variables at once in PowerShell?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, you can display the value of multiple variables by separating them with a comma. For example, to display the values of variables &#8220;number1&#8221; and &#8220;number2&#8221;, you can type $number1,$number2 in the PowerShell console.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"3_How_can_I_display_the_value_of_a_variable_in_a_specific_format_in_PowerShell\"><\/span>3. How can I display the value of a variable in a specific format in PowerShell?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYou can use formatting operators like -f to display variables in a specific format. For example, if you want to display a variable &#8220;number&#8221; as currency, you can type &#8220;{0:c}&#8221; -f $number in the PowerShell console.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"4_Is_there_a_way_to_display_the_value_of_a_variable_on_a_new_line_in_PowerShell\"><\/span>4. Is there a way to display the value of a variable on a new line in PowerShell?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, you can use the newline character &#8220;`n&#8221; to display the value of a variable on a new line. For example, if you want to display the value of variable &#8220;number&#8221; on a new line, you can type &#8220;`n$number&#8221; in the PowerShell console.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"5_How_do_I_display_the_value_of_an_array_variable_in_PowerShell\"><\/span>5. How do I display the value of an array variable in PowerShell?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nTo display the value of an array variable in PowerShell, you can use the indexing operator []. For example, if you have an array variable named &#8220;numbers&#8221; with values 1, 2, and 3, you can display the first element by typing $numbers[0].<\/p>\n<h3><span class=\"ez-toc-section\" id=\"6_Can_I_display_the_value_of_a_variable_in_a_message_box_in_PowerShell\"><\/span>6. Can I display the value of a variable in a message box in PowerShell?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, you can display the value of a variable in a message box using the Write-Host cmdlet. For example, to display the value of variable &#8220;number&#8221; in a message box, you can type Write-Host $number.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"7_How_can_I_display_the_value_of_a_variable_with_a_message_in_PowerShell\"><\/span>7. How can I display the value of a variable with a message in PowerShell?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYou can concatenate a message with a variable by using the &#8220;+&#8221; operator. For example, if you want to display a message &#8220;The value of number is:&#8221; followed by the value of variable &#8220;number&#8221;, you can type &#8220;The value of number is: &#8221; + $number.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"8_Is_there_a_way_to_display_the_value_of_a_variable_only_if_it_meets_a_certain_condition_in_PowerShell\"><\/span>8. Is there a way to display the value of a variable only if it meets a certain condition in PowerShell?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, you can use conditional statements like if-else to display the value of a variable only if it meets a certain condition. For example, you can use if ($number -eq 10) { Write-Host $number } to display the value of variable &#8220;number&#8221; only if it equals 10.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"9_How_do_I_display_the_value_of_a_variable_in_a_table_format_in_PowerShell\"><\/span>9. How do I display the value of a variable in a table format in PowerShell?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYou can use the Format-Table cmdlet to display the value of a variable in a tabular format. For example, if you have a variable &#8220;number&#8221; with a value of 10, you can type $number | Format-Table.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"10_Can_I_display_the_value_of_a_variable_in_a_different_color_in_PowerShell\"><\/span>10. Can I display the value of a variable in a different color in PowerShell?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, you can change the text color using the ForegroundColor property of the Write-Host cmdlet. For example, to display the value of variable &#8220;number&#8221; in red color, you can type Write-Host $number -ForegroundColor Red.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"11_How_can_I_display_the_value_of_a_variable_in_uppercase_or_lowercase_in_PowerShell\"><\/span>11. How can I display the value of a variable in uppercase or lowercase in PowerShell?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYou can use the ToUpper() and ToLower() methods to display the value of a variable in uppercase or lowercase, respectively. For example, if you want to display the value of variable &#8220;string&#8221; in uppercase, you can type $string.ToUpper().<\/p>\n<h3><span class=\"ez-toc-section\" id=\"12_Is_there_a_way_to_display_the_value_of_a_variable_without_any_leading_or_trailing_whitespace_in_PowerShell\"><\/span>12. Is there a way to display the value of a variable without any leading or trailing whitespace in PowerShell?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYou can use the Trim() method to remove any leading or trailing whitespace from the value of a variable. For example, if you want to display the value of variable &#8220;text&#8221; without any leading or trailing whitespace, you can type $text.Trim().<\/p>\n","protected":false},"excerpt":{"rendered":"<p>**In PowerShell, you can display the value of a variable by simply typing the variable name preceded by a &#8220;$&#8221; sign. For example, if you have a variable named &#8220;number&#8221; with a value of 10, you can display it by typing $number in the PowerShell console.** PowerShell is a powerful scripting language that allows you &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to display variable value in PowerShell?\" class=\"read-more button\" href=\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#more-237631\">Read more<span class=\"screen-reader-text\">How to display variable value in PowerShell?<\/span><\/a><\/p>\n","protected":false},"author":59,"featured_media":107420,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[86279],"tags":[],"class_list":["post-237631","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-learn","no-featured-image-padding"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to display variable value in PowerShell?<\/title>\n<meta name=\"description\" content=\"**In PowerShell, you can display the value of a variable by simply typing the variable name preceded by a &quot;$&quot; sign. For example, if you have a variable\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to display variable value in PowerShell?\" \/>\n<meta property=\"og:description\" content=\"**In PowerShell, you can display the value of a variable by simply typing the variable name preceded by a &quot;$&quot; sign. For example, if you have a variable\" \/>\n<meta property=\"og:url\" content=\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/\" \/>\n<meta property=\"og:site_name\" content=\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/synchronyfinancial\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-18T05:04:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2024\/03\/faq.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Francis French\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@synchrony\" \/>\n<meta name=\"twitter:site\" content=\"@synchrony\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Francis French\" \/>\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:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/\"},\"author\":{\"name\":\"Francis French\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/1622769be52c41a10d83bee2c48a8c48\"},\"headline\":\"How to display variable value in PowerShell?\",\"datePublished\":\"2024-06-18T05:04:26+00:00\",\"dateModified\":\"2024-06-18T05:04:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/\"},\"wordCount\":719,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#organization\"},\"articleSection\":[\"Learn\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/\",\"url\":\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/\",\"name\":\"How to display variable value in PowerShell?\",\"isPartOf\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#website\"},\"datePublished\":\"2024-06-18T05:04:26+00:00\",\"dateModified\":\"2024-06-18T05:04:26+00:00\",\"description\":\"**In PowerShell, you can display the value of a variable by simply typing the variable name preceded by a \\\"$\\\" sign. For example, if you have a variable\",\"breadcrumb\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/namso-gen.co\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to display variable value in PowerShell?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#website\",\"url\":\"https:\/\/namso-gen.co\/blog\/\",\"name\":\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\",\"description\":\"In Namso gen blog you can get many tips regarding to Credit cards, VCC, Credit card security etc. You can generate credit cards by using Namso-gen.co\",\"publisher\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/namso-gen.co\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#organization\",\"name\":\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\",\"url\":\"https:\/\/namso-gen.co\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png\",\"contentUrl\":\"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png\",\"width\":500,\"height\":164,\"caption\":\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\"},\"image\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/synchronyfinancial\",\"https:\/\/twitter.com\/synchrony\",\"https:\/\/www.youtube.com\/synchronyfinancial\",\"https:\/\/www.instagram.com\/synchrony\",\"https:\/\/www.linkedin.com\/company\/synchrony-financial\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/1622769be52c41a10d83bee2c48a8c48\",\"name\":\"Francis French\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"Francis French\"},\"description\":\"Guest author Francis French has meticulously crafted and revised this article to the best of their knowledge and understanding. Readers are strongly advised to exercise caution, verify information independently, and rely on their own judgment when considering the information provided. Read more articles on Namso Gen here.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to display variable value in PowerShell?","description":"**In PowerShell, you can display the value of a variable by simply typing the variable name preceded by a \"$\" sign. For example, if you have a variable","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:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/","og_locale":"en_US","og_type":"article","og_title":"How to display variable value in PowerShell?","og_description":"**In PowerShell, you can display the value of a variable by simply typing the variable name preceded by a \"$\" sign. For example, if you have a variable","og_url":"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/","og_site_name":"Namso Gen Blog - Free Credit Card Generator [100% Valid]","article_publisher":"https:\/\/www.facebook.com\/synchronyfinancial","article_published_time":"2024-06-18T05:04:26+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2024\/03\/faq.png","type":"image\/png"}],"author":"Francis French","twitter_card":"summary_large_image","twitter_creator":"@synchrony","twitter_site":"@synchrony","twitter_misc":{"Written by":"Francis French","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#article","isPartOf":{"@id":"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/"},"author":{"name":"Francis French","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/1622769be52c41a10d83bee2c48a8c48"},"headline":"How to display variable value in PowerShell?","datePublished":"2024-06-18T05:04:26+00:00","dateModified":"2024-06-18T05:04:26+00:00","mainEntityOfPage":{"@id":"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/"},"wordCount":719,"commentCount":0,"publisher":{"@id":"https:\/\/namso-gen.co\/blog\/#organization"},"articleSection":["Learn"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/","url":"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/","name":"How to display variable value in PowerShell?","isPartOf":{"@id":"https:\/\/namso-gen.co\/blog\/#website"},"datePublished":"2024-06-18T05:04:26+00:00","dateModified":"2024-06-18T05:04:26+00:00","description":"**In PowerShell, you can display the value of a variable by simply typing the variable name preceded by a \"$\" sign. For example, if you have a variable","breadcrumb":{"@id":"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/namso-gen.co\/blog\/how-to-display-variable-value-in-powershell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/namso-gen.co\/blog\/"},{"@type":"ListItem","position":2,"name":"How to display variable value in PowerShell?"}]},{"@type":"WebSite","@id":"https:\/\/namso-gen.co\/blog\/#website","url":"https:\/\/namso-gen.co\/blog\/","name":"Namso Gen Blog - Free Credit Card Generator [100% Valid]","description":"In Namso gen blog you can get many tips regarding to Credit cards, VCC, Credit card security etc. You can generate credit cards by using Namso-gen.co","publisher":{"@id":"https:\/\/namso-gen.co\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/namso-gen.co\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/namso-gen.co\/blog\/#organization","name":"Namso Gen Blog - Free Credit Card Generator [100% Valid]","url":"https:\/\/namso-gen.co\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png","contentUrl":"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png","width":500,"height":164,"caption":"Namso Gen Blog - Free Credit Card Generator [100% Valid]"},"image":{"@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/synchronyfinancial","https:\/\/twitter.com\/synchrony","https:\/\/www.youtube.com\/synchronyfinancial","https:\/\/www.instagram.com\/synchrony","https:\/\/www.linkedin.com\/company\/synchrony-financial"]},{"@type":"Person","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/1622769be52c41a10d83bee2c48a8c48","name":"Francis French","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"Francis French"},"description":"Guest author Francis French has meticulously crafted and revised this article to the best of their knowledge and understanding. Readers are strongly advised to exercise caution, verify information independently, and rely on their own judgment when considering the information provided. Read more articles on Namso Gen here."}]}},"_links":{"self":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/posts\/237631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/users\/59"}],"replies":[{"embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/comments?post=237631"}],"version-history":[{"count":0,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/posts\/237631\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/media\/107420"}],"wp:attachment":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/media?parent=237631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/categories?post=237631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/tags?post=237631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}