Where is powershell located in windows 10. Windows PowerShell: what is this program. Using a keyboard shortcut

There are several ways to open PowerShell in Windows 10.

Through search

On the taskbar, click on the magnifying glass icon. A window will open at the bottom where you enter the word PowerShell. After this, an icon with Windows inscription PowerShell desktop application.

How to launch Windows Powershell on Windows 10 via search

Clicking on it with the left mouse button will immediately open Windows PowerShell, and if you right-click on it, a menu will open in which you can run Windows PowerShell as an administrator.

Via Start

Press Start - Windows PowerShell. Having opened last point find in Windows list PowerShell and left-click on it, and if you right-click, a menu will open in which you select Advanced - Run as administrator.

Via task manager

Launch the task manager by pressing three keys at once Ctrl+Shift+Esc. To make a menu appear in the task manager, click on More details. Then click File - Start new task.


Task Manager, File, Create New Task

A window will open in which you need to enter powershell and click OK and Windows PowerShell will launch immediately. If you also check the box in this box Create a task with administrator rights and click OK, then Windows PowerShell will start with administrator rights.

Through the Execute line

Win+R. A window called Run will open. Enter the command in this window powershell and click OK. This will immediately open the Windows PowerShell window and close the Run window.

Via Explorer

Having opened the explorer, you need to enter in the address bar powershell and press the Enter key on your keyboard. This will immediately open a Windows PowerShell window.


How to open Powershell Windows 10 as administrator

If you need to run Windows PowerShell as an administrator, then in Explorer you will need to click File - Run Windows PowerShell - Run Windows PowerShell as Administrator. This will immediately launch a Windows PowerShell window with administrator rights.

Via context menu

Press two keys on the keyboard at the same time Win+X. A context menu will open in which you select the item Windows PowerShell or Windows PowerShell with Administrator rights.
If command line items appear in the menu instead of Windows PowerShell, then you need to open parameters. Go to Settings - Personalization - Taskbar. Then on the right side of the parameters you need to find the line Replace command line Windows shell PowerShell in the menu that appears when you right-click or press Windows keys+X. Under this line you need to switch the slider to position On and close the settings window. After this, the menu will have Windows PowerShell options.

Via executable file

In Explorer at Local disk C:\Windows\System32\WindowsPowerShell\v1.0 find the file powershell.


Performing Windows file PowerShell

Hover over this file and right-click, a context menu will open. If you select Open then Windows PowerShell will start immediately, and if you select Run as administrator then Windows PowerShell will start with administrator rights.

Greetings!

The Windows operating system has long been supported command line, with the corresponding shell. However, Microsoft felt that the scripting language it supported was not flexible enough. As a result, Windows PowerShell was created as an alternative.

This command line shell is built into the system, but not everyone knows how to open it in order to execute the necessary commands in it. We will fill this gap by describing in detail and demonstrating with images how to easily open the Windows PowerShell window in Windows 10.

Instructions for opening a Windows PowerShell window in Windows 10

IN operating system There are several ways to open and use Windows PowerShell. Let's look at the easiest method first.


Video instruction

Well, we talked in detail about the discovery of a useful tool built into the system called PowerShell, which was created to execute various commands and scripts based on them, and now you can complete this material. I really hope that this material answered all your questions. See you!

Experienced operating room users Windows systems 10 may have heard of the PowerShell command line utility. Those with experience working with Windows 7 and 8.1 may also be familiar with it. After many years of using the command app Windows strings and .bat files, it's time to get acquainted with a more functional tool.

PowerShell is a valuable addition to the list Windows tools and its scale may deter some users. What is it - a scripting language or a command shell? Don't worry: despite the extensive capabilities, anyone can master PowerShell.

Step 1: Installation

First, we need the PowerShell utility itself. If you're running Windows 10, you already have PowerShell 5 installed. Windows Update 10 Anniversary Update uses version 5.1, but the difference is unnoticeable. Windows 8 and 8.1 use PowerShell 4, which is also quite sufficient. Installing PowerShell on Windows 7 will not cause problems, but you will still have to take a couple of extra steps. In particular, you need to additionally install the .Net Framework. You can install the Windows Management Framework, which includes PowerShell.

PowerShell has two interfaces. Advanced users can opt for a full GUI interface known as the Integrated Scripting Environment (ISE). For beginners, it's best to use the PowerShell console, a simple text-based Windows command line-style interface, or even DOS 3.2.

To run PowerShell as an administrator in Windows 10, click the Start button and scroll down to Windows PowerShell. On Windows 8.1, look for Windows PowerShell in the System folder in Windows. In Windows 7, the shell is located in the Accessories folder. As a regular user, PowerShell can be launched in the same way, using the left mouse button instead of the right one.

You can use search on any version of Windows. For ease of future use, you can pin PowerShell to the taskbar.

Step 2: Old Windows Commands

Syntax Windows commands in PowerShell it works as usual. For example, CD changes folders, dir shows a list of all files and folders inside the current folder.

Depending on how you launch the PowerShell console, you might start in c:\Windows\system32 or in c :\Users\ . The example in the screenshot uses the command cd..(with a space) to move up one level at a time, then run the command dir to display a list of files and folders in a directory C:\.

Step 3: Install Help Files

Teams like CD And dir are not active teams PowerShell shells. These are so-called aliases - replacements for real PowerShell commands. Aliases are useful for those who have extensive experience with the command line. However, they don't touch the depths of PowerShell.

To get started with PowerShell, type help and the command you need. The screenshot shows the command .

Team help says that dir is an alias for the PowerShell command Get-ChildItem. If you type get-childitem V PS C:\>, you will see the same thing as when using the command dir.

As noted at the bottom of the screenshot, help files for PowerShell are not installed automatically. To get them, run PowerShell as administrator and type update-help. Installing the help files will take several minutes; a number of modules may be missing - for example, in this case, Help for NetWNV and SecureBoot were not installed. When everything is ready, complete system help will always give the necessary tips.

Now type the command get-help and any command you are interested in (“cmdlet” in PowerShell, cmdlets in Russian), its description will be shown. For example, get-help get-childitem displays a list of options get-childitem. You can also display different possible options. For example

get-help get-childitem -examples

gives seven detailed usage examples get-childitem. Team

get-help get-childitem -detailed

includes these seven examples and detailed explanations of each parameter in the cmdlet get-childitem.

Step 4: Get help with settings

In the screenshot you may have noticed two lists under SYNTAX For get-childitem. Having two different syntaxes means there are two ways to run the cmdlet. How to keep the syntax separate from each other and what do the parameters mean? The answer is simple if you know the trick.

For details regarding cmdlet parameters get-childitem or any other use parameter -full:

get-help get-childitem -full

This gives you a list of what you can do with the cmdlet and what will happen. Look at the screenshot.

Reviewing the parameter descriptions, you will notice that get-childitem makes it possible to get an object child(such as a subfolder name or file name) in a specified location, with or without matching certain characters. For example:

get-childItem “*.txt” -recurse

returns a list of "*.txt" files in the current folder and all subfolders (due to the parameter -recurse). Whereas

get-childitem “HKLM:\Software”

returns a list of all top-level registry keys in HKEY_LOCAL_MACHINE\Software.

If you've ever tried to get into the registry using the Windows command line or .bat files, you'll appreciate the functionality of this access option.

Step 5: Learning Names

There's a reason why the cmdlets shown so far look similar: get-childitem, update-help, get-help use a single verb-noun pattern. All PowerShell cmdlets use this convention; they use a verb before a single noun. This will appeal to those who once suffered from inconsistent command names in the VB and VBA languages.

Take a look at the most common cmdlets:

set-location: sets the current working location to a specific location

get-content: Gets the contents of the file

get-item: Receives files and folders

copy-item: copies an object from one location to another

remove-item: Deletes files and folders

: Gets processes running on a local or remote computer

get-service: Gets services running on a local or remote computer

invoke-webrequest: Retrieves content from a web page on the Internet

To view how a specific cmdlet works, use get-help as in the case

get-help copy-item -full

Based on the description in the help, you can understand what the cmdlet needs. For example, if you want to copy all files and folders from Documents V c:\temp, use

copy-item c:\users\ \documents\* c:\temp

When you enter this command, you will see several interesting opportunities PowerShell environment. For example, if you type copy-i and press the Tab button, PowerShell will fill in Copy-Item. If you type a cmdlet incorrectly and PowerShell cannot recognize it, it is given Full description what was done wrong.

Try this cmdlet:

invoke-webrequest askwoody.com

You'll get a short list of the web page's titles, images, links, and other content. Please note in get-help to the list invoke-webrequest, which “returns a collection of forms, links, images, and other important HTML elements”—exactly what should be shown on the screen.

Some cmdlets help you manage PowerShell itself:

get-command: list of all available cmdlets

get-verb: list of all available verbs

clear-host: Clear the host program screen

Different parameters allow you to reduce commands and narrow the circle useful options. For example, to see a list of all cmdlets that work with Windows services, type

get-command *-service

All verbs available with the noun will be shown service. Here is their list:

Get-Service

New-Service

Restart-Service

Resume-Service

Set-Service

Start-Service

Stop-Service

Suspend-Service

You can combine these cmdlets with others.

Step 6: Using Pipes

If you are familiar with the Windows command line or batch files, then you know about redirection and pipes. Redirection (> symbol) and pipes (| symbol) take the result of an action and attach it to another location. For example, you can redirect the result of the command dir V text file or pass the result of the command ping to the team find to filter interesting results like

dir > temp.txt

ping askwoody.com | find “packets” > temp2.txt

Here on the second team find searches for a string packets, taken from the address askwoody.com by the team ping and concatenates all matching lines into a file called temp2.txt.

The first of these commands works fine in PowerShell. To run the second command you would need something like

ping askwoody.com | select-string packets | out-file temp2.txt

Using redirection and pipes greatly expands the capabilities of the Windows command line: instead of endlessly scrolling down the screen to search for a text string, you can filter the Windows commands you need.

Powershell has support pipe, and it is not limited to text. PowerShell allows you to pass an entire object from one cmdlet to another, where the object is a combination of data (called properties) and actions (methods) that can use that data.

The tricky part comes when lining up the objects. The objects supplied by one cmdlet must match the type of objects accepted by the receiving cmdlet. Text is a very simple object type, so if you're working with text, aligning objects is a simple task. The remaining objects are not so basic.

How to understand this? Use cmdlet get-member. If you want to know what type of object a cmdlet is processing, run it through get-member. For example, if you are trying to understand the processes running on a computer and have narrowed your options down to cmdlets , here's how to find out the result of the cmdlets:

get-process | get-member

Running this cmdlet produces a long list of properties and methods for , but at the very beginning of the list you can see the type of object that creates :

TypeName: System.Diagnostics.Process

The below screenshot also shows the properties entitled get-process Handles, Name, NPM, PM, SI, VM And W.S..

If you want to manipulate the result To work with this cmdlet (instead of displaying a long list of active processes on the monitor), you need to find another command that takes as input System.Diagnostics.Process. To find the cmdlet you need, use PowerShell again:

get-command -Parametertype System.Diagnostics.Process

This cmdlet provides a list of cmdlets that can process System.Diagnostics.Process.

Some cmdlets are known for accepting almost any kind of data. Chief among them is . This cmdlet passes through each object sent through the pipe, one by one, and applies the specified selection criteria to it. There is a special marker called $_ , which allows you to use each item in the pipe, one at a time.

Let's say you want to get a list of all processes running on a computer with the name "svchost", that is, you want to match the property Name process svchost. Use the command:

get-process | where-object ($_.Name -eq “svchost”)

Cmdlet looks at every object System.Diagnostics.Process, compares .Name this object with "svchost"; if there are matches, they are displayed on the monitor. Look at the screenshot.

Step 7: Analyze Useful PowerShell Commands

By now you already know enough to be able to damage the computer, so be careful. Let's look, for example, at frequently requested PowerShell commands.

These commands only work on Windows 10 and only when you run PowerShell as an administrator. They are designed to reinstall pre-installed Windows applications 10 and may be useful to those who first deleted these programs and then decided to return them. The commands look like this:

Get-AppXPackage | Foreach (Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”)

If you run this command, ignore the red warnings and when the command completes, restart your computer; All preinstalled programs in Windows 10 will appear in their places.

Here's how this command works. Get-AppXPackage checks all application packages in the user profile. Even if you delete the application, it remains in the user profile list.

Cmdlet Get-AppXPackage returns an object TypeName Microsoft.Windows.Appx.PackageManager.Commands.AppxPackage, which includes the fully qualified name of the application package and the location of the corresponding XML manifest file. If you run the cmdlet get-appxpackage, you will see a long list of application packages. The screenshot shows the description of the Xbox app.

Cmdlet Foreach loops through each object in AppXPackage by sending them to the cmdlet Add-AppxPackage. According to get-help For Add-AppxPackage, there are two key switches:

  • Switch -Register used for registration existing installations application packages, you can set parameters DisableDevelopmentMode And Register
  • Switch -DisableDevelopmentMode tells Windows to re-register an existing application package that has been disabled, unregistered, or corrupted.

Line " $($_.InstallLocation)\AppXManifest.x ml" describes where the file is located manifest.xml. If you look at the files AppXManifest.xml, you'll see a complex list of application IDs, executable files, and a large number of visual elements associated with the application.

After the reboot, all added application packages are downloaded and installed from Windows Store Store.

Many users know about the command line, while a very small number of people know about Windows PowerShell. Instead of the command line, you can work with Windows PowerShell, which gives you more power and control over your computer with installed Windows 10. Hence, in this article we have written various tips for different ways Run PowerShell as Administrator on Windows 10 operating system as Administrator. Microsoft has already created a shell called the shell for handling configuration and performing automation tasks. In Windows, PowerShell comes to your rescue when you have a ton of administrative work to do.
For example, you ask PowerShell to recognize programs that are not running exactly and you need to kill their processes. Also online you can ask a PowerShell question and expose all installed USB devices on one or more computers. You can really do a lot of things with PowerShell. If you prefer to work with it, read various ways to run it on Windows 10 as an administrator.

How to Run PowerShell as Administrator on Windows 10

1. Through the conductor

Using this method, you can access the Windows PowerShell system for the location or locations of some special selected drives or folders.

Launch Explorer and go to the partition where your disk or folder is located.
Click on the folder you want to launch in PowerShell and click on the file on the far left side of the menu.
From the options provided, click Open Windows PowerShell as Administrator.

2. Via Task Manager

Right-click on an empty area of ​​the taskbar and click the 3rd option at the bottom in Task Manager.

The Task Manager window appears. On the top left corner of the menu, you will find the file. Click on this option. In the outlier fourth place. select the first choice at the top that says perform a new task.

Create a new task in this window. In the text field, enter PowerShell and select the option to create a task with administrator rights.

Click OK to continue.
PowerShell with administrator rights will be visible on the screen.

3. Via Cortana Search

Click Cortana search and type PowerShell in the field and press Enter.

Cortana will show you the PowerShell option with its icon.
Right-click on it and select run as administrator.

PowerShell will be launched with administrator rights.

4. Through Explorer, but this time right-click on the context menu.

Open File Explorer on the screen and follow the path –
C:\Windows\System32\WindowsPowerShell\v1.0
Look for PowerShell.exe which is located in the middle part of Explorer. Right-click on it, it's in second place from the top, and run as administrator.

With these 4 methods, you can run PowerShell as an administrator on Windows 10.

Windows PowerShell and Windows 10 Command Prompt - basic setup and management.

Quite experienced Windows users, of course, remember the MS-DOS command line, although perhaps these memories are not so pleasant. But even after 20 years of trying to screw up the Command Prompt, Windows 10 still rewards those who understand the benefits of using the Command Prompt for some common tasks.

As all system administrators know, typing a command is faster than using a GUI, and this is even truer for scripts that can execute a whole series of commands. Windows 10 includes an environment shell a new generation of Windows PowerShell that offers tremendous power to those who are willing to spend a little time learning its commands.

Command Windows processor - cmd.exe, looks similar to its ancient ancestor, MS-DOS. On a 64-bit Windows 10 system, Cmd.exe is a native Windows 64-bit process. The easiest way to open the command line is the Quick Links menu (right-click Start or use the Windows key + X shortcut). This menu has two command line options. One, working under yours account user and the second, runs with administrator rights.

You can also enter in the search field cmd and then, in the list of results, click " Command line". Or right-click on the element and then, in context menu, select "Open as administrator" to open an elevated Command Prompt window. The visible differences between these two methods is the admin prefix that appears in the command line session title bar. You can see these changes in the picture below, where the properties settings for the command line window are open. This can be done by right-clicking the icon on the left side of the title bar and then selecting Properties.

To change the command line color scheme from the retro green/black combination, use the color tab. (Look at the file dates in the preview window!)

How to go from Explorer to the command line with two clicks

You are in Explorer. And want to open a command prompt window in the current folder. Luckily, there's a shortcut for this. While holding down the Shift key, right-click any empty space in the folder (make sure no files are selected), and then select Open Command Window from the context menu.

If you don't know what you can do in the Windows 10 Command Prompt window, type " help" A list of 84 commands appears with brief description for each of them. Want to know the full syntax for the command? In the Command Prompt window, enter the name of the command followed by the switch /? .

The Command Prompt is useful for some file management tasks, and its syntax hasn't changed much since the days of MS-DOS. For example, using wildcards, using the command Ren*.htm*.html, you can change the extension of a group of files in a folder. This work is almost impossible in .

There are a few commands that you probably don't know, but they can be very useful. The following list contains several such commands:

 . This handy command outputs detailed description current system. Including hostname, Windows version and the original installation date, domain membership, or working group, network details and much more. The image below shows a small portion of the possible output of this command. Enter the command with " > " followed by the full path to the destination file to save the results to a file that you can view later.

The output for the Systeminfo command contains much more detail than the snippet shown here. Redirect the output to a text file to save the information for future use.

Driverquery. If you are wondering what drivers are installed on a given system (local or remote), this command will help you. Use /FO CSV to indicate that you want to output data in comma-separated value (CSV) format. Redirect the output to a file and you can open it for more detailed analysis in Excel.

Icacls. This oddly named command lets you manage permissions (access control lists, or ACLs) on files and folders. If you are unable to delete or rename a file or folder due to permission, this command will help you.

 . Sometimes the Power menu doesn't have the options you really need. This command, with different switches ( /r to reboot and /s to turn off) can cover the desired scenarios. Using the parameter /t, you can specify the time to wait (in seconds) before executing the command. (The default is 30 seconds.) If you have multiple tasks and want your computer to restart after 15 minutes, use the command shutdown /r /t 900. If you change your mind, use it to cancel a scheduled shutdown or reboot.

Sc. With this command, you can query, start, pause, stop, and configure services using the Service Control Manager. Its syntax is complex, but its capabilities are extremely powerful.

Tasklist And Taskkill. Using these commands you can create a list of running tasks and then forcefully terminate any process on that list. Taskkill is a blunt weapon, but very effective at the right moment.

For more quick navigation In the Command Prompt window, it's worth learning how the arrow keys work. Use the up and down arrows to scroll and repeat the last command. Use the right arrow button to repeat the previous command one character at a time, which can save you time if you need to repeat the command with a different parameter or switch. Finally, after repeating or typing a command, but before pressing Enter, use the left and right arrows to move through the command and make changes as needed. When editing a command, press the Insert key to switch between replace mode (in which everything you type replaces the existing contents of the command line) and insert mode, which appends what you type without disturbing the current command.

Windows PowerShell

Windows 10 Command Prompt can trace its lineage back more than three decades. The much more modern Windows PowerShell, version 1.0, appeared only ten years ago.

An incredibly rich PowerShell environment built for system administrators, automation of their tasks and system configuration. Instead of a limited number of commands, Windows PowerShell offers cmdlets that work with file system, registry, certificate stores and almost any Windows component(desktop and server). Cmdlets are available in the core modules that come with every edition of Windows 10. And of course, the real challenge for many of them is the ability to combine cmdlets into scripts. If you are an administrator, you can use these scripts to quickly and efficiently complete repetitive management tasks.

If you're not a system administrator, Windows PowerShell can be intimidating. But some tasks, including managing Microsoft Azure and Office 365, are ideal for Windows PowerShell commands. Let's just get acquainted with the basics of Windows PowerShell.

Windows PowerShell includes its own command line environment, with a distinctive blue background that is installed separately from the Windows 10 Command Prompt. As shown in the image below, one of the first things anyone new to Windows PowerShell should do is display a cmdlet Get-Help, including a link to online help And detailed instructions to use the cmdlet Update-Help.

Use the Get-Help cmdlet to get started in an interactive Windows PowerShell command-line environment.

Add the word Get-Help to the end and you can find cmdlets that include that term. If you know there is a cmdlet for managing but don't exactly remember it, try Bitlocker Get-Help to display this list. Using the syntax Get-Help -online , you can go directly to online directory and get information about a specific cmdlet.

If you are not sure of the exact cmdlet name, you can press the Tab key and use IntelliSense. For example, enter get-p and press Tab to see the first matching cmdlet, Get-Package. Keep the Tab key pressed and scroll through the entire loop: Get-PackageProvider, Get-PackageSource and so on.

If you need additional help, consider using Windows PowerShell's Integrated Scripting Experience (ISE), which offers a graphical interface and lots of prompts as you type cmdlets. The picture below shows Windows PowerShell ISE with the command window and cmdlet open on the right Get-MpComputerStatus from module. You don't need to enter a cmdlet here. Simply select it from the list and click “Run”.

WITH using Windows PowerShell ISE, you can dock the command window with the shell so that you can view the cmdlets in the module and click Run or Paste.

If you prefer a floating window instead of a docked panel, on the toolbar, click the Show Command Window button (second from the right). As shown in the picture, here you can see the full selection of modules.

Although the Windows PowerShell ISE is specifically designed for creating Windows PowerShell scripts, its Commands add-in serves as a useful learning tool.