Tag: PowerShell

How to install the latest PowerShell on Windows 11

What's new in PowerShell 7 PowerShell 5.1 is installed by default in Windows 10 and Windows 11. In recent years, there has been an active development of new versions of PowerShell 7.*: 7.0, 7.1. PowerShell 7.2 beta is currently in development You can view the PowerShell 6.* and PowerShell 7.* changelog on this page: https://github.com/PowerShell/PowerShell/tree/master/CHANGELOG Despite the rapid development of...

How to shut down computers in PowerShell

Stop-Computer cmdlet The Stop-Computer cmdlet shuts down the local or remote computer. You can run Stop-Computer with additional options to specify authentication types and alternate credentials, and to force an immediate shutdown. This cmdlet uses the Win32Shutdown method of the Win32_OperatingSystem WMI class. The following two commands are identical and shutdown the local computer: Stop-Computer Stop-Computer -ComputerName localhost The following...

How to restart computers in PowerShell

Restart-Computer Cmdlet The Restart-Computer cmdlet restarts the operating system on a local or remote computer. The following command will reboot the local computer: Restart-Computer You can use Restart-Computer with various parameters to trigger restart operations, to specify authentication levels and alternate credentials, to restrict operations to be performed simultaneously, and to restart immediately. Starting with Windows PowerShell 3.0, you can...

How to configure the network interface to use a dynamic IP address (DHCP) in PowerShell

Note: all settings in this article must be done with administrator rights. Dynamic Host Configuration Protocol (DHCP) allows the network adapter to obtain the correct network settings without manually configuring network interfaces. To manage a network interface, you need to know its index. The list of interfaces and their indices can be obtained with the following command: Get-NetIPAddress | Format-Table...

How to set IP address, netmask, default gateway and DNS for a network interface in PowerShell

Setting a static IP, netmask and gateway for a network adapter in PowerShell is a little confusing but possible. This post will show you how to do this using the New-NetIPAddress and Set-NetIPAddress cmdlets. The old way of configuring network interfaces is using the netsh command. First, we look at the name of the network interfaces of any of the...

How to manage services on Windows

What are services Services are a kind of programs that run in the background and do not require user input. Services can either be specific to the Windows operating system or be third-party applications. Examples of services that the user can install himself: web server, VNC remote desktop server, SSH server, MySQL server. You can manage services: in the graphical...

How to install PowerShell on Arch Linux, Manjaro, BlackArch

PowerShell on Linux PowerShell is a cross-platform automation and configuration tool/platform. PowerShell has a large number of system administration-oriented commands. But at the same time, PowerShell is a full-fledged programming language that allows you to write functional programs (scripts). Note that PowerShell 5 is currently preinstalled on Windows by default, but this manual shows the installation of the latest version...

How to install PowerShell in Linux Mint

The PowerShell installation instructions often forget about Linux Mint, apparently, their authors believe that Linux Mint users do not need PowerShell. Let's fill that gap and take a look at how to install PowerShell in Linux Mint. Linux Mint has several versions - “regular”, which, by the way, also differs in desktop environments (Cinnamon, MATE, Xfce) and LMDE (stands for...

Linux PowerShell Basics (Beginner’s Guide)

PowerShell for Linux In recent years, there has been a trend at Microsoft to cross-platform some of its products and open their source. Also Linux itself became part of Windows in the form of a subsystem. PowerShell, which was originally a Windows-only component, was released as open source and became cross-platform on August 18, 2016, available for Linux and Mac...

How to display all environment variables at the Windows command prompt

This article will show you how to display all environment variables from the Windows command line. PowerShell and CMD First of all, you need to distinguish what kind of program you are working in. The first appeared CMD - Windows command line, shell. For many years, CMD was the only option for running on the Windows command line. Then PowerShell...
Loading...
X