How to set up smartphones and PCs. Informational portal
  • home
  • Windows
  • Powershell does not open in windows 10. How to open PowerShell, all methods

Powershell does not open in windows 10. How to open PowerShell, all methods

Unlike Linux, in which applications are traditionally installed from external repositories, in Windows OS most desktop programs are installed from EXE or MSI-file, less often using a web installer that downloads an executable file to the PC. According to adherents Linux, this method has a number of disadvantages, so, firstly, you have to manually search for the desired program on the Internet, and secondly, there is always a risk of downloading an outdated or virus-infected version.

Indeed, installing software from trusted repositories reduces the risk "pick up" The virus helps save time spent searching for the necessary software, and in general, significantly simplifies the procedure for installing and updating software packages. However, the ability to install applications from external repositories is also present in Windows, it’s just that this function has not received wide recognition. So, in the tenth version of Windows there is a special module that allows you to download and install applications from an online or local source using the command line PowerShell .

To view the list of available comadlets, run PowerShell as administrator and run the command Get-Command -Module PackageManagement .

The current version of the module has 13 command belts. Here they are:

Get-Package- displays a list of installed programs and components.
Get-PackageProvider- Using this command you can get a list of supported software providers.
- the command searches for programs in the source.
Get-PackageSource- obtaining a list of sources.
Install-Package- the command installs the program on the computer.
Uninstall-Package- deleting the program.
Register-PackageSource - adding a software source for a supported provider.
Save-Package- saving the application distribution without installation on the computer.
Set-PackageSource- setting the provider as a source of packages.
Unregister-PackageSource - removing the supplier from the list of package sources.

Now let's see how to use all this. First, you need to find out which software providers are supported. Run PowerShell as administrator and run the following command:

Most likely, after running the command you will be prompted to install the provider nuget. Nuget, as well as PSGallery and a number of other providers are more focused on system administrators; ordinary users are more suitable, however, it is worth installing so that the system no longer offers it in the future.

Therefore we introduce y , press enter and get a list of available providers. Now let's connect the provider by executing the command below and confirming the installation by entering y :

Please also note the warning that the provider is not marked as reliable.

This means that each time you install a package, you will be asked for confirmation. To disable it, you need to add the provider to the list of trusted ones by running the following command:

In this case, a folder should appear in the root of the system drive.

Now let’s make sure that the provider is installed and you can work with it:

Get-PackageSource

A positive result will be indicated by a flag true in a collumn InTrust. So, the provider is connected, now let's install some application on the computer. Naturally, for this we need to know whether it is in the database. There are two options - you can go to the official website of the supplier chocolatey.org/packages and enter its name into the search form.

Or search directly in the console PowerShell using the cmdlet . Find and install the browser Opera . We execute the search command, specifying as a parameter Name program name and vendor name as parameter Source :

Find-Package -Name *Opera* -Source Chocolatey

The application has been found in the database, let's install it, but before that we must allow, if this has not been done before, the execution of scripts PowerShell otherwise the executable files of the programs may not be downloaded.

Politics is changed by such a team.

Starting with Windows 10 1809, Microsoft changed the way the RSAT (Remote Server Administration Tools) package is installed. Previously, after each upgrade of the Windows 10 build (for example, from 1809 to 1903), you had to manually download the msu package with the latest version of the distribution kit with RSAT and install it on your computer, but now the following message appears on the RSAT download page on the Microsoft website:

IMPORTANT: Starting with Windows 10 October 2018 Update, RSAT is included as a set of “Features on Demand” in Windows 10 itself.

RSAT in Windows 10 as Features on Demand (FoD)

The fact is that, starting with Windows 10 1809 (17763), you no longer have to manually download the latest version of RSAT from the Microsoft website. Remote Server Administration Tools is now built into the Windows 10 image and installed as a separate option ( Features on demand / Features on Demand). Installation of RSAT is possible from the application Options.

The Windows 10 distribution does not include RSAT installation files; to install them, your computer needs direct access to the Internet. In addition, you cannot install RSAT in Windows 10 Home edition; only Professional and Enterprise editions are suitable.

To install RSAT on Windows 10 1809, you need to go to the section Settings -> Apps -> ManageOptionalFeatures -> Addafeature(Windows Settings -> Applications -> Advanced Features -> Add a Feature). Here you can select and install the tools you need from the RSAT package.

The following administration tools are available:

  • RSAT: Active Directory Domain Services and Lightweight Directory Services Tools
  • RSAT: BitLocker Drive Encryption Administration Utilities
  • RSAT: Active Directory Certificate Services Tools
  • RSAT: DHCP Server Tools
  • RSAT: DNS Server Tools
  • RSAT: Failover Clustering Tools
  • RSAT: File Services Tools
  • RSAT: Group Policy Management Tools
  • RSAT: IP Address Management (IPAM) Client
  • RSAT: Data Center Bridging LLDP Tools
  • RSAT: Network Controller Management Tools
  • RSAT: Network Load Balancing Tools
  • RSAT: Remote Access Management Tools
  • RSAT: Remote Desktop Services Tools
  • RSAT: Server Manager
  • RSAT: Shielded VM Tools
  • RSAT: Storage Migration Service Management Tools
  • RSAT: Storage Replica Module for Windows PowerShell
  • RSAT: System Insights Module for Windows PowerShell
  • RSAT: Volume Activation Tools
  • RSAT: Windows Server Update Services Tools

Installing RSAT on Windows 10 using PowerShell

You can install the RSAT administration components using PowerShell. In this example, we will show you how to manage RSAT components on Windows 10 1903.

You can use the following command to check if RSAT components are installed on your computer:

You can present the status of installed RSAT components in a more convenient table:

Get-WindowsCapability -Name RSAT* -Online | Select-Object -Property DisplayName, State

As you can see, the RSAT components are not installed (NotPresent).

You can use the Add-WindowsCapacity cmdlet to set these Windows options.

To install a specific RSAT tool, such as AD management tools (including the console and ), run the command:

Add-WindowsCapability –online –Name “Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0”

To install the DNS and Management Console, run:

Add-WindowsCapability –online –Name “Rsat.Dns.Tools~~~~0.0.1.0”

Add-WindowsCapability -Online -Name Rsat.BitLocker.Recovery.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.CertificateServices.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.DHCP.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.FailoverCluster.Management.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.FileServices.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.GroupPolicy.Management.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.IPAM.Client.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.LLDP.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.NetworkController.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.NetworkLoadBalancing.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.RemoteAccess.Management.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.RemoteDesktop.Services.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.ServerManager.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.Shielded.VM.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.StorageMigrationService.Management.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.StorageReplica.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.SystemInsights.Management.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.VolumeActivation.Tools~~~~0.0.1.0
Add-WindowsCapability -Online -Name Rsat.WSUS.Tools~~~~0.0.1.0

To install all available RSAT tools at once, run:

To install only the missing RSAT components, run:

Get-WindowsCapability -Online |? ($_.Name -like "*RSAT*" -and $_.State -eq "NotPresent") | Add-WindowsCapability -Online

Now make sure that the RSAT tools are installed (status Installed);

After this, the installed RSAT tools will be displayed in the panel ManageOptionalFeatures.

Error 0x800f0954 when installing RSAT on Windows 10

If you have Internet access on Windows 10 desktops, but installing RSAT via Add-WindowsCapability or DISM (DISM.exe /Online /add-capability /CapabilityName:Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0 .1.0), you see an error 0x800f0954, this means your computer is configured to update from local using .

To correctly install RSAT components in Windows 10 1809+, you can temporarily disable updating from the WSUS server in the registry (HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU parameter UseWUServer= 0) and restart the update service.

You can use this PowerShell script:

$val = Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" | select -ExpandProperty UseWUServer
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" -Value 0
Restart-Service wuauserv
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability –Online
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" -Value $val
Restart-Service wuauserv

Or you can set up a new GPO setting that allows you to customize installation options for additional Windows components and Features On Demand (including RSAT).


Installing RSAT via PowerShell or Dism should now complete without errors.

Installing RSAT in Windows 10 offline

If you encounter the Add-WindowsCapability failed error when installing RSAT. Error code = 0x800f0954, or you don’t see RSAT in the list of additional components ( No components required for installation), most likely your computer is configured to receive updates from the internal WSUS/SCCM SUP server.

Let's look at how to install RSAT in Windows 10 1903 offline (corporate network without direct access to the Internet).

To install RSAT offline, you need to download an ISO disk image with FoD for your version of Windows 10 from your personal account on the Microsoft licensing website - Volume Licensing Service Center (VLSC). The image is called something like this: Windows 10 Features on Demand, version 1903.

For example, for Windows 10 1903 x64 you need to download an image SW_DVD9_NTRL_Win_10_1903_64Bit_MultiLang_FOD_.ISO(about 5 GB). Unzip the image to a network folder. You will end up with a set of many *.cab files.

Now, to install RSAT components on a Windows 10 desktop, you need to specify the path to this network directory with FoD. For example:

Add-WindowsCapability -Online -Name Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0 -LimitAccess -Source \\msk-fs01\Distr\Windows-FOD\Win101903x64\

You can also specify the path to the directory with FoD components using the group policy discussed above. For this purpose in the steamer Alternativesourcefilepath you need to specify the UNC path to the directory.

Or you can set this parameter through the registry by specifying the directory path in the parameter LocalSourcePath(type REG_Expand_SZ) in the registry branch HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Servicing.

After this, users will be able to independently install RSAT components through the graphical interface for adding Windows 10 components.

Greetings!

The operating system of the Windows family has long had command line support, with a 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

Your operating system has 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 the questions you have. See you!

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

Quite experienced Windows users will, 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 the next generation of Windows PowerShell, which offers tremendous power to those willing to spend a little time learning its commands.

Windows Command 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 runs under your user account 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 the context menu, select "Open as administrator" to open an elevated command prompt window. The visible difference between these two methods is the administrator prefix that appears in the title bar of the command line session. You can see these changes in the image below, where the properties settings for the Command Prompt window are open 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 will appear with a brief description for each. 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 displays a detailed description of the current system. Including hostname, Windows version and original installation date, domain or workgroup membership, network details, and 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.

To navigate the Command Prompt window faster, 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 just ten years ago.

An incredibly rich PowerShell environment built for system administrators, automating their tasks and system configuration. Instead of a limited number of commands, Windows PowerShell offers cmdlets that work with the file system, registry, certificate stores, and almost any component of Windows (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 for using 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 the online reference 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 more 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”.

Using Windows PowerShell ISE, you can dock a command window with the shell so that you can view the cmdlets in a 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.

How to open PowerShell from the Win + X menu

This method is very convenient in Windows 10. Starting from Windows 8, Microsoft introduced the “Power Users” menu, which contains many useful items such as “Control Panel”, “Network Connections”, etc. Of course, Windows 10 also has this is the menu. It contains a PowerShell element and a PowerShell (administrator), the latter is exactly what we need.

To access this menu on Windows 10, press the Win + X keyboard shortcuts.

In the menu that opens, click on the item PowerShell (administrator).

Opening PowerShell using Search in Windows 10.


In Windows 10, you can use the search icon on the taskbar. Click on the search icon and Type PowerShell, press CTRL + SHIFT + ENTER to run PowerShell as administrator.

This also works in the start menu, just start typing PowerShell, then right-click on the view that appears Windows PowerShell and select Run as Administrator.

Launch an instance of PowerShell from Windows 10 Explorer


You can launch PowerShell from Explorer. You may wonder why you need this. Let me show you a sample scenario.

Best articles on the topic