<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rakesh Chowdhury</title>
    <description>The latest articles on DEV Community by Rakesh Chowdhury (@rakeshchow202).</description>
    <link>https://dev.to/rakeshchow202</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1045616%2Fa021e3ad-f996-4036-af4c-111412543e23.jpg</url>
      <title>DEV Community: Rakesh Chowdhury</title>
      <link>https://dev.to/rakeshchow202</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rakeshchow202"/>
    <language>en</language>
    <item>
      <title>Updating PowerShell and Installing PSReadLine on Windows 8.1</title>
      <dc:creator>Rakesh Chowdhury</dc:creator>
      <pubDate>Wed, 15 Mar 2023 08:41:53 +0000</pubDate>
      <link>https://dev.to/rakeshchow202/updating-powershell-and-installing-psreadline-on-windows-81-3oha</link>
      <guid>https://dev.to/rakeshchow202/updating-powershell-and-installing-psreadline-on-windows-81-3oha</guid>
      <description>&lt;h2&gt;
  
  
  Why?
&lt;/h2&gt;

&lt;p&gt;With Windows 8.1 reaching the end of LTS I was faced with multiple challenges on my VM. I cannot depend on windows updates anymore to update a newly installed VM.&lt;/p&gt;

&lt;p&gt;One of the major problems was getting Golang binaries to work properly on the terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Exception&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;System.IO.IOException:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;parameter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;incorrect&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I found out that it was actually caused cause of a Outdated Powershell version (Windows 8.1 comes with v4). So I thought of manually updating it rather than using windows updates.&lt;/p&gt;

&lt;p&gt;Here's a write up for anyone who is trying to achieve the same.&lt;/p&gt;

&lt;h2&gt;
  
  
  How?
&lt;/h2&gt;

&lt;p&gt;We need to first decide on the version we want. There are two options here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;5.1&lt;/li&gt;
&lt;li&gt;7 (latest)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This guide covers both the cases. You can check the installation requirements &lt;a href="https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/docs-conceptual/windows-powershell/install/Windows-PowerShell-System-Requirements.md"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Check PowerShell Version
&lt;/h3&gt;

&lt;p&gt;Check if you're running an outdated version of PowerShell by typing:&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing PowerShell Version 5.1
&lt;/h3&gt;

&lt;p&gt;We need to first download Windows Management Framework 5.1 from &lt;a href="https://aka.ms/wmf5download"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once you head to the website you click the "Download" button. You will find two options for Win8.1, a "x86" and a "x64" msi file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tDN2LQ7u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzj793adkngoyyuwlcqq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tDN2LQ7u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzj793adkngoyyuwlcqq.png" alt="Last Two Files" width="880" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need to select the version appropriate to our system. For me I have a 64 bit CPU (which is mostly the case for modern cpu). For VM it can be "x86" depending on the configurations.&lt;/p&gt;

&lt;p&gt;Download the File and run it. It should install and reboot your PC.&lt;/p&gt;

&lt;p&gt;After reboot run &lt;code&gt;powershell&lt;/code&gt; again and check &lt;code&gt;$PSVersionTable&lt;/code&gt;. It should now show v5.1.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lrC6-gy0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5u7ykt0rv3bsjrgznfv8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lrC6-gy0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5u7ykt0rv3bsjrgznfv8.png" alt="Updated to 5.1" width="436" height="152"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing PowerShell 7
&lt;/h3&gt;

&lt;p&gt;To install PowerShell 7 is pretty easy as well. We need to head to the poweshell &lt;a href="https://github.com/PowerShell/PowerShell"&gt;github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Then select a installer according to your CPU&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uep68GqE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b04k2m75lgxosa589b43.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uep68GqE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b04k2m75lgxosa589b43.png" alt="Get PowerShell" width="854" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go though the installation&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S_S4tLCY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tp2adqn9ief48gq718t7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S_S4tLCY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tp2adqn9ief48gq718t7.png" alt="PowerShell 7 Installer" width="509" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and that should install PowerShell 7 on your Windows 8.1 installation :)&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing PSReadLine
&lt;/h2&gt;

&lt;p&gt;PSReadLine allows a lot of commandline utilities to work properly, thus we will be installing it as well.&lt;/p&gt;

&lt;p&gt;If we head to the PSReadLine &lt;a href="https://github.com/PowerShell/PSReadLine"&gt;Github&lt;/a&gt;, we can find installation instructions.&lt;/p&gt;

&lt;p&gt;We need to install PowerShellGet beforehand (press &lt;code&gt;A&lt;/code&gt; when asked):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Install-Module&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;PowerShellGet&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Force&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then install &lt;code&gt;PSReadLine&lt;/code&gt; (press &lt;code&gt;A&lt;/code&gt; when asked):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Install-Module&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;PSReadLine&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great we installed &lt;code&gt;PSReadLine&lt;/code&gt; successfully!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We Learnt to install/update PowerShell on a Windows 8.1 Installation &lt;/p&gt;

</description>
      <category>powershell</category>
      <category>commandline</category>
      <category>windows</category>
      <category>windows81</category>
    </item>
  </channel>
</rss>
