PowerShell

Basics
Installation
Introduction
Set-ExecutionPolicy Unrestricted -Force
Start from the console as an administrator
Network
Open ports
Open the port
Get-NetIPConfiguration:network information
Allow RDP connectivity
OpenSSH status of the server
Launch sshd
hostname: Get the name of the host
Download the file
Users
Get the current user
List of users
List of administrators
Create a user
Make the user an administrator
Teams.
Get-Content -Tail: View the end of the file (similar to tail)
Get-FileHash: Check the file checksum (similar to md5sum)
Get-Process
Select-StringSelect a line by pattern (similar to grep)
Stop-Process: Stop the process (similar to kill)
New-Item: Create a new file (similar to touch)
Alias
Get-Alias:existing aliases
Delete the alias
Create an alias
The configuration
Mistakes.
Functions
Example
$profile: Configuration
Files.
Files.
Directories
Test-Path: check the existence
New-Item: Create a directory
Expand-Archiveunpack
Rename-Item: rename the directory
Join-Path linkage

Article author: Andrei Olegovich