this article mainly describes how to install and use PowerShell on Ubuntu 16.04 LTS. You know, PowerShell Core is a cross platform launched by Microsoft Corp (Windows, Linux and macOS) and configuration automation tools / frameworks, and the existing tools mix very well, and the structured data (such as JSON, CSV, XML, API and REST) to do the optimization of object model. PowerShell includes a command line shell, a related scripting language, and a framework for dealing with cmdlet.

first introduces the process of gradually installing Microsoft PowerShell on Ubuntu 16.04 (Xenial Xerus) server.

installs PowerShell

steps on Ubuntu 16.04 LTS. First, run the following command in the terminal to ensure that all system packages are up to date.

 sudo apt-get update # # sudo apt-get upgrade

2: Ubuntu 16.04 installed on the steps in PowerShell. There are two ways.

method 1: use Debian software package to install

first, download the Debian package to your Ubuntu server:

 WGet v6.0.1/powershell_6.0.1-1.ubuntu.16.04_amd64.deb # # dpkg -i powershell_6.0.1-1.ubuntu.16.04_amd64.deb

using the following command to install the PowerShell:

 apt-get install -f 

method: 2 Microsoft provided the software to install the

warehouse using the official Ubuntu PowerShell Microsoft Repository:

 curl # installed sudo tee /etc/apt/sources.list.d/microsoft.list 

then perform the following operations in the terminal:

 apt-get update apt-get # # install -y PowerShell 

is installed, you can run the PowerShell, just enter the following command "pwsh" at the prompt:

 # pwsh

has been successfully installed at PowerShell.

PowerShell introduces

Windows PowerShell, which is designed specifically for system administrators, Windows command line Shell. Windows PowerShell contains interactive prompts and scripting environments that can be used individually or in combination.

is different from most Shell (they accept and return text). Windows PowerShell is generated on the basis of dotNET Framework common language runtime (CLR) and dotNET Framework, it accepts and returns dotNET dotNET object. This basic change in the environment brings new tools and methods to the management and configuration of Windows.

Windows PowerShell introduces the concept of cmdlet (read "command-let"), a simple single function command line tool built in Shell. Each cmdlet can be used separately, but only when you combine these simple tools to perform complex tasks will you realize their powerful functions. Windows PowerShell contains more than 100 basic core cmdlet, you can write your own cmdlet and share it with other users. Windows PowerShell aims to improve the command line and scripting environment by eliminating long-standing problems and adding new features. Change

PowerShell v6.0.1 version of the main are as follows: the basic operation of the

1. Core Runtime and use dotNet package to upgrade to version 2.0.5

2. to repair a number of security problems in



to change the status of the computer collects information about the computer


to create a custom PowerShell compatibility

dotNET and

to create a shortcut to the COM object (New-Object)

to create a custom input box to create a graphical date picker

get the WMI object (Get WmiObject)

Process using the current location management Cmdlet management process

management services

management Windows PowerShell driver


multiselect the list box

other useful feet The object

implementation using Out Cmdlet


redirect data delete objects from the pipeline (Where)

for multiple objects repeat tasks (ForEach)

from the list box to choose a

selection object (Select to

) parts of objects sort

use the format change command output view


method using a static class view object structure (Get Member)

files and folders files, folders and registry key


using the printer


registry entries using the registry key


software installed above

this article is based on PowerShell in Ubuntu system is to explain the use of small share to all people, I hope to give you a For reference, we also hope that a lot of people will support the home of the script.

you might be interested in this article:

This concludes the body part

This paper fixed link: | Script Home | +Copy Link

Article reprint please specify:The use of PowerShell in the Ubuntu system | Script Home

You may also be interested in these articles!