RECOMMENDED: Click here to fix Windows errors and optimize system performance
PowerShell 7.0 is an open source, cross-platform (Windows, MacOS and Linux) edition of PowerShell designed to handle heterogeneous environments and hybrid clouds.
In addition, PowerShell 7.0 supports the ARM32 and ARM64 variants of Debian, Ubuntu, and Alpine Linux ARM64.
Getting PowerShell 7 to Work
PowerShell 7 is installed in a new directory and runs in parallel with Windows PowerShell 5.1. For PowerShell Core 6.x, PowerShell 7 is a direct update that removes PowerShell Core 6.x.
PowerShell 7 is installed to %programfiles%\PowerShell\7
The %programfiles%\PowerShell\7 folder is added to $env:PAT
The PowerShell 7 installation packages update previous versions of PowerShell Core 6.x :
- PowerShell Core 6.x on Windows: %programfiles%\PowerShell\6 is replaced by %programfiles%\PowerShell\7
- Linux: /opt/microsoft/powershell/6 is replaced by /opt/microsoft/powershell/7
- macOS: /usr/local/microsoft/powershell/6 is replaced by /usr/local/microsoft/powershell/7
Ansible is increasingly becoming the application delivery and software deployment platform for developers because of its ease of use and flexibility. It is also easy to implement and does not require the installation of an agent on remote nodes. Instead, Ansible uses password-free SSH authentication to manage remote Unix/Linux hosts. However, in this topic we will see how to manage Windows hosts with Ansible.
Installing Ansible on Windows and Linux
Installing Ansible on a Linux system is very simple. Most packaging systems for Linux distributions already have it. Here are some of the common ways to install Ansible :
- sudo apt install ansible
- sudo yum install ansible
- sudo dnf install ansible
However, Windows is a unique case because Ansible is not available as a Windows package. The easiest way to install Ansible for use on Windows is to use the Windows for Linux (WSL) subsystem. This is a virtualized instance of Linux that runs parallel to Windows. Once it is installed, you can use the same installation commands in the WSL to install Ansible.
Set Up Ansible
There are a few key elements we need to install PowerShell 7 We need a Hosts file to define our target locations. There are many ways to set this up, but generally a folder structure like the one below works well.
- Play books
In the inventory directory, we would create a hosts file containing all the systems we want to target with our playbook. A simple hosts file that creates a group of hosts under the production label is described below. The comments are useful to let you know what the real hostname of the systems is.
#Test system 03
#Test system 04
You can create multiple host groups, and the same host can exist in multiple groups. This makes it easier to group and “flag” these hosts for later handling more complex roles.
RECOMMENDED: Click here to troubleshoot Windows errors and optimize system performance
CCNA, Web Developer, PC Troubleshooter
I am a computer enthusiast and a practicing IT Professional. I have years of experience behind me in computer programming, hardware troubleshooting and repair. I specialise in Web Development and Database Design. I also have a CCNA certification for Network Design and Troubleshooting.