Skip to content

Installing Powershell on RHEL

  • by

PowerShell can be installed in RHEL by using Package Manager as well by using Direct Download. For installing this on RHEL7 and RHEL8 there are different commands which could be used as both versions use different set of package managers (YUM and DNF). Since Powershell is published to Microsoft Linux repositories, it becomes much easier to download and install powershell

By following the below steps, you would be able to install Powershell modules on RHEL or even on Ubuntu

Step1: Register the Microsoft RedHat Repository as shown below

# Register the Microsoft RedHat repository
curl | sudo tee /etc/yum.repos.d/microsoft.repo

Step2: Then install Powershell as shown

sudo yum install --assumeyes powershell

Step3: Then start the powershell or executed some powershell commands as shown below

# Start PowerShell

The above commands are for powershell but it would be also similar for any Ubuntu servers