Windows server 2019 установить powershell

Содержание
  1. Установка OpenSSH для Windows Server 2019 и Windows 10 Installation of OpenSSH For Windows Server 2019 and Windows 10
  2. Установка OpenSSH через пользовательский интерфейс настройки в Windows Server 2019 или Windows 10 версии 1809 Installing OpenSSH from the Settings UI on Windows Server 2019 or Windows 10 1809
  3. Установка OpenSSH с помощью PowerShell Installing OpenSSH with PowerShell
  4. Удаление OpenSSH Uninstalling OpenSSH
  5. Начальная настройка сервера SSH Initial Configuration of SSH Server
  6. Начальное использование SSH Initial use of SSH
  7. Установка PowerShell в Windows Installing PowerShell on Windows
  8. Предварительные требования Prerequisites
  9. Скачивание скрипта установщика Download the installer package
  10. Установка пакета MSI Installing the MSI package
  11. Установка администратором из командной строки Administrative install from the command line
  12. Разделы реестра, созданные во время установки Registry keys created during installation
  13. Установка ZIP-пакета Installing the ZIP package
  14. Развертывание в Windows 10 IoT Корпоративная Deploying on Windows 10 IoT Enterprise
  15. Развертывание в Windows 10 IoT Базовая Deploying on Windows 10 IoT Core
  16. Развертывание на Nano Server Deploying on Nano Server
  17. Автономное развертывание PowerShell Offline Deployment of PowerShell
  18. Автономное PowerShell в сети Online Deployment of PowerShell
  19. Установка в качестве глобального средства .NET Install as a .NET Global tool
  20. Установка PowerShell через Winget Install PowerShell via Winget
  21. Установка из Microsoft Store Installing from the Microsoft Store
  22. Использование пакета MSIX Using the MSIX package
  23. Создание конечной точки удаленного взаимодействия How to create a remoting endpoint
  24. Обновление существующей установки Upgrading an existing installation
  25. Поддержка установки Installation support

Установка OpenSSH для Windows Server 2019 и Windows 10 Installation of OpenSSH For Windows Server 2019 and Windows 10

Клиент OpenSSH и сервер OpenSSH являются отдельными устанавливаемыми компонентами в Windows Server 2019 и Windows 10 1809. The OpenSSH Client and OpenSSH Server are separately installable components in Windows Server 2019 and Windows 10 1809. Пользователи с этими версиями Windows могут установить и настроить OpenSSH, используя приведенные ниже инструкции. Users with these Windows versions should use the instructions that follow to install and configure OpenSSH.

Пользователи, которые получили OpenSSH из репозитория PowerShell на сайте GitHub (https://github.com/PowerShell/OpenSSH-Portable) должны использовать инструкции из репозитория, а не эти инструкции. Users who acquired OpenSSH from the PowerShell GitHub repo (https://github.com/PowerShell/OpenSSH-Portable) should use the instructions from there, and should not use these instructions.

Установка OpenSSH через пользовательский интерфейс настройки в Windows Server 2019 или Windows 10 версии 1809 Installing OpenSSH from the Settings UI on Windows Server 2019 or Windows 10 1809

Клиент и сервер OpenSSH устанавливаются в Windows 10 версии 1809 как отдельные компоненты. OpenSSH client and server are installable features of Windows 10 1809.

Чтобы установить OpenSSH, откройте раздел Параметры и последовательно выберите Приложения > Приложения и возможности > Управление дополнительными компонентами. To install OpenSSH, start Settings then go to Apps > Apps and Features > Manage Optional Features.

Просмотрите этот список и выясните, установлен ли клиент OpenSSH. Scan this list to see if OpenSSH client is already installed. Если нет, то выберите пункт Добавить компонент в верхней части страницы, а затем: If not, then at the top of the page select «Add a feature», then:

  • чтобы установить клиент OpenSSH, найдите элемент Клиент OpenSSH и щелкните Установить; To install the OpenSSH client, locate «OpenSSH Client», then click «Install».
  • чтобы установить сервер OpenSSH, найдите элемент Сервер OpenSSH и щелкните Установить. To install the OpenSSH server, locate «OpenSSH Server», then click «Install».

После завершения установки вернитесь в раздел Приложения > Приложения и возможности > Управление дополнительными компонентами, где теперь должны появиться компоненты OpenSSH. Once the installation completes, return to Apps > Apps and Features > Manage Optional Features and you should see the OpenSSH component(s) listed.

Установка сервера OpenSSH создаст и включит правило брандмауэра с именем OpenSSH-Server-in-TCP. Installing OpenSSH Server will create and enable a firewall rule named «OpenSSH-Server-In-TCP». Правило разрешает входящий трафик SSH через порт 22. This allows inbound SSH traffic on port 22.

Установка OpenSSH с помощью PowerShell Installing OpenSSH with PowerShell

Чтобы установить OpenSSH с помощью PowerShell, запустите PowerShell от имени администратора. To install OpenSSH using PowerShell, first launch PowerShell as an Administrator. Убедитесь, что функции OpenSSH доступны для установки, выполнив следующие действия. To make sure that the OpenSSH features are available for install:

Затем установите компонент сервера и (или) клиента. Then, install the server and/or client features:

Удаление OpenSSH Uninstalling OpenSSH

Чтобы удалить OpenSSH через раздел Параметры в ОС Windows, откройте этот раздел и последовательно выберите Приложения > Приложения и возможности > Управление дополнительными компонентами. To uninstall OpenSSH using the Windows Settings, start Settings then go to Apps > Apps and Features > Manage Optional Features. В списке установленных компонентов выберите компонент Клиент OpenSSH или Сервер OpenSSH и щелкните Удалить. In the list of installed features, select the OpenSSH Client or OpenSSH Server component, then select Uninstall.

Чтобы удалить OpenSSH с помощью PowerShell, выполните одну из следующих команд: To uninstall OpenSSH using PowerShell, use one of the following commands:

После удаления OpenSSH может потребоваться перезагрузка Windows, если служба использовалась в момент удаления. A Windows restart may be required after removing OpenSSH, if the service is in use at the time it was uninstalled.

Начальная настройка сервера SSH Initial Configuration of SSH Server

Чтобы настроить только что установленный сервер OpenSSH для использования в ОС Windows, запустите PowerShell от имени администратора и выполните следующие команды, чтобы запустить службу SSHD: To configure the OpenSSH server for initial use on Windows, launch PowerShell as an administrator, then run the following commands to start the SSHD service:

Начальное использование SSH Initial use of SSH

После установки сервера OpenSSH в Windows вы можете быстро проверить его работу с помощью PowerShell на любом устройстве Windows, где установлен клиент SSH. Once you have installed the OpenSSH Server on Windows, you can quickly test it using PowerShell from any Windows device with the SSH Client installed. В PowerShell запустите следующую команду: In PowerShell type the following command:

Первое подключение к любому серверу сопровождается сообщением примерно такого содержания: The first connection to any server will result in a message similar to the following:

В качестве ответа принимаются значения yes (да) или no (нет). The answer must be either «yes» or «no». Ответ «Да» приведет к добавлению этого сервера в список известных узлов SSH в локальной системе. Answering Yes will add that server to the local system’s list of known ssh hosts.

Читайте также:  Windows ярлык с url

После этого появится запрос на ввод пароля. You will be prompted for the password at this point. В целях безопасности пароль не будет отображаться по мере ввода. As a security precaution, your password will not be displayed as you type.

После успешного подключения вы увидите командную оболочку, которая выглядит примерно так: Once you connect you will see a command shell prompt similar to the following:

По умолчанию для сервера OpenSSH в ОС Windows используется командная оболочка Windows. The default shell used by Windows OpenSSH server is the Windows command shell.

Установка PowerShell в Windows Installing PowerShell on Windows

Есть несколько способов установки PowerShell в Windows. There are multiple ways to install PowerShell in Windows.

Предварительные требования Prerequisites

Последний выпуск PowerShell поддерживается в Windows 7 с пакетом обновления 1 (SP1), Windows Server 2008 R2 и более поздних версий. The latest release of PowerShell is supported on Windows 7 SP1, Server 2008 R2, and later versions.

Чтобы включить удаленное взаимодействие PowerShell через WSMan, нужно выполнить следующие условия: To enable PowerShell remoting over WSMan, the following prerequisites need to be met:

  • Установите универсальную среду выполнения C в Windows предшествующих Windows 10 версий. Install the Universal C Runtime on Windows versions predating Windows 10. Ее можно скачать самостоятельно или через Центр обновления Windows. It’s available via direct download or Windows Update. Этот пакет уже установлен в полностью исправленных системах. Fully patched systems already have this package installed.
  • Установите Windows Management Framework (WMF) 4.0 или более поздней версии в Windows 7 и Windows Server 2008 R2. Install the Windows Management Framework (WMF) 4.0 or newer on Windows 7 and Windows Server 2008 R2. Подробные сведения о WMF см. в статье с обзором WMF. For more information about WMF, see WMF Overview.

Скачивание скрипта установщика Download the installer package

Чтобы установить PowerShell в Windows скачайте [актуальный][] пакет установки с GitHub. To install PowerShell on Windows, download the latest install package from GitHub. Также доступна актуальная предварительная версия. You can also find the latest preview version. Прокрутите страницу вниз до раздела ресурсов. Scroll down to the Assets section of the Release page. Раздел ресурсов может быть свернут. В таком случае щелкните его, чтобы развернуть. The Assets section may be collapsed, so you may need to click to expand it.

Установка пакета MSI Installing the MSI package

MSI-файл выглядит примерно так: PowerShell- -win- .msi . The MSI file looks like PowerShell- -win- .msi . Пример: For example:

После скачивания дважды щелкните установщик и следуйте инструкциям на экране. Once downloaded, double-click the installer and follow the prompts.

Программа установки создает ярлык в меню Windows «Пуск». The installer creates a shortcut in the Windows Start Menu.

  • По умолчанию пакет устанавливается в каталог $env:ProgramFiles\PowerShell\ . By default the package is installed to $env:ProgramFiles\PowerShell\
  • Вы можете запустить PowerShell с помощью меню «Пуск» или файла $env:ProgramFiles\PowerShell\ \pwsh.exe . You can launch PowerShell via the Start Menu or $env:ProgramFiles\PowerShell\ \pwsh.exe

PowerShell 7.1 устанавливается в новом каталоге и работает параллельно с Windows PowerShell 5.1. PowerShell 7.1 installs to a new directory and runs side-by-side with Windows PowerShell 5.1. PowerShell 7.1 устанавливается как обновление на месте взамен PowerShell 6.x PowerShell 7.1 is an in-place upgrade that replaces PowerShell 6.x. или PowerShell 7.0. or PowerShell 7.0.

  • PowerShell 7.1 устанавливается в папке $env:ProgramFiles\PowerShell\7 . PowerShell 7.1 is installed to $env:ProgramFiles\PowerShell\7
  • Папка $env:ProgramFiles\PowerShell\7 добавляется в переменную $env:PATH . The $env:ProgramFiles\PowerShell\7 folder is added to $env:PATH
  • Папка $env:ProgramFiles\PowerShell\6 удалена. The $env:ProgramFiles\PowerShell\6 folder is deleted

Если вам нужно запустить PowerShell 7.1 параллельно с другими версиями, используйте метод установки ZIP-архива, чтобы установить новую версию в другую папку. If you need to run PowerShell 7.1 side-by-side with other versions, use the ZIP install method to install the other version to a different folder.

Установка администратором из командной строки Administrative install from the command line

MSI-пакеты можно устанавливать из командной строки, что позволяет администраторам развертывать их без взаимодействия с пользователем. MSI packages can be installed from the command line allowing administrators to deploy packages without user interaction. MSI-пакет включает в себя следующие свойства для управления параметрами установки: The MSI package includes the following properties to control the installation options:

  • ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL. Это свойство позволяет добавлять пункт Открыть PowerShell в контекстное меню проводника. ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL — This property controls the option for adding the Open PowerShell item to the context menu in Windows Explorer.
  • ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL. Это свойство позволяет добавлять пункт Выполнить с помощью PowerShell в контекстное меню проводника Windows. ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL — This property controls the option for adding the Run with PowerShell item to the context menu in Windows Explorer.
  • ENABLE_PSREMOTING. Это свойство позволяет включать удаленное взаимодействие PowerShell во время установки. ENABLE_PSREMOTING — This property controls the option for enabling PowerShell remoting during installation.
  • REGISTER_MANIFEST. Это свойство позволяет регистрировать манифест ведения журнала событий Windows. REGISTER_MANIFEST — This property controls the option for registering the Windows Event Logging manifest.

В следующих примерах показано, как выполнить автоматическую установку PowerShell со всеми включенными параметрами. The following example shows how to silently install PowerShell with all the install options enabled.

Полный список параметров командной строки для Msiexec.exe см. здесь. For a full list of command-line options for Msiexec.exe , see Command line options.

Разделы реестра, созданные во время установки Registry keys created during installation

Начиная с версии PowerShell 7.1, пакет MSI создает разделы реестра, которые хранят данные о расположении установки и версии PowerShell. Beginning in PowerShell 7.1, the MSI package creates registry keys that store the installation location and version of PowerShell. Эти значения можно найти в разделе HKLM\Software\Microsoft\PowerShellCore\InstalledVersions\ . These values are located in HKLM\Software\Microsoft\PowerShellCore\InstalledVersions\ . Значение уникально для каждого типа сборки (выпуск или предварительная версия), основного номера версии и архитектуры. The value of is unique for each build type (release or preview), major version, and architecture.

Release Release Architecture Architecture Ключ реестра Registry Key
Выпуск версии 7.1.x 7.1.x Release x86 x86 HKLM\Software\Microsoft\PowerShellCore\InstalledVersions\1d00683b-0f84-4db8-a64f-2f98ad42fe06
Выпуск версии 7.1.x 7.1.x Release X64 x64 HKLM\Software\Microsoft\PowerShellCore\InstalledVersions\31ab5147-9a97-4452-8443-d9709f0516e1
Предварительная версия 7.1.x 7.1.x Preview x86 x86 HKLM\Software\Microsoft\PowerShellCore\InstalledVersions\86abcfbd-1ccc-4a88-b8b2-0facfde29094
Предварительная версия 7.1.x 7.1.x Preview X64 x64 HKLM\Software\Microsoft\PowerShellCore\InstalledVersions\39243d76-adaf-42b1-94fb-16ecf83237c8

Может использоваться администраторами и разработчиками для поиска пути к PowerShell. This can be used by administrators and developers to find the path to PowerShell. Значения будут одинаковыми для всех выпусков предварительных и дополнительных версий. The values will be the same for all preview and minor version releases. Значения отличаются для каждого выпуска основной версии. The values are changed for each major release.

Установка ZIP-пакета Installing the ZIP package

Для поддержки расширенных сценариев развертывания доступны ZIP-архивы двоичных файлов PowerShell. PowerShell binary ZIP archives are provided to enable advanced deployment scenarios. Скачайте один из следующих ZIP-архивов на странице с [выпусками][выпуски]. Download one of the following ZIP archives from the [releases][releases] page.

  • PowerShell-7.1.3-win-x64.zip PowerShell-7.1.3-win-x64.zip
  • PowerShell-7.1.3-win-x86.zip PowerShell-7.1.3-win-x86.zip
  • PowerShell-7.1.3-win-arm64.zip PowerShell-7.1.3-win-arm64.zip
  • PowerShell-7.1.3-win-arm32.zip PowerShell-7.1.3-win-arm32.zip

В зависимости от способа загрузки файла может потребоваться разблокировать файл с помощью командлета Unblock-File . Depending on how you download the file you may need to unblock the file using the Unblock-File cmdlet. Распакуйте содержимое в выбранное расположение и запустите pwsh.exe . Unzip the contents to the location of your choice and run pwsh.exe from there. В отличие от установки пакетов MSI при установке ZIP-архива не выполняется проверка соответствия предварительным требованиям. Unlike installing the MSI packages, installing the ZIP archive doesn’t check for prerequisites. Для правильного удаленного взаимодействия с помощью WSMan необходимо обеспечить соответствие предварительным требованиям. For remoting over WSMan to work properly, ensure that you’ve met the prerequisites.

Используйте этот метод для установки версии PowerShell на основе ARM на таких компьютерах, как Microsoft Surface Pro X. Чтобы получить оптимальные результаты, устанавливайте PowerShell в папку $env:ProgramFiles\PowerShell\7 . Use this method to install the ARM-based version of PowerShell on computers like the Microsoft Surface Pro X. For best results, install PowerShell to the to $env:ProgramFiles\PowerShell\7 folder.

Этот метод можно использовать для установки любой версии PowerShell, в том числе последней: You can use this method to install any version of PowerShell including the latest:

Развертывание в Windows 10 IoT Корпоративная Deploying on Windows 10 IoT Enterprise

Windows 10 IoT Корпоративная поставляется со средой Windows PowerShell, которую можно использовать для развертывания PowerShell 7. Windows 10 IoT Enterprise comes with Windows PowerShell, which we can use to deploy PowerShell 7.

Создайте PSSession для целевого устройства Create PSSession to target device

Скопируйте ZIP-файл на устройство Copy the ZIP package to the device

Присоединитесь к устройству и извлеките архив Connect to the device and expand the archive

Настройте удаленное взаимодействие с PowerShell 7 Set up remoting to PowerShell 7

Подключение к конечной точке PowerShell 7 на устройстве Connect to PowerShell 7 endpoint on device

Развертывание в Windows 10 IoT Базовая Deploying on Windows 10 IoT Core

Windows PowerShell добавляется в Windows 10 IoT Базовая, если вы включаете функцию IOT_POWERSHELL, которую можно использовать для развертывания PowerShell 7. Windows 10 IoT Core adds Windows PowerShell when you include IOT_POWERSHELL feature, which we can use to deploy PowerShell 7. Действия, описанные выше для Windows 10 IoT Корпоративная, могут быть выполнены и для центра Интернета вещей. The steps defined above for Windows 10 IoT Enterprise can be followed for IoT Core as well.

Чтобы добавить последнюю версию PowerShell в образ для доставки, используйте команду Import-PSCoreRelease для включения пакета в рабочую область и добавления OPENSRC_POWERSHELL в образ. For adding the latest PowerShell in the shipping image, use Import-PSCoreRelease command to include the package in the workarea and add OPENSRC_POWERSHELL feature to your image.

В архитектуре ARM64 Windows PowerShell не добавляется при включении IOT_POWERSHELL. For ARM64 architecture, Windows PowerShell is not added when you include IOT_POWERSHELL. Поэтому установка на основе ZIP-файла не поддерживается. So the zip based install will not work. Для добавления в образ используйте команду Import-PSCoreRelease . You will need to use Import-PSCoreRelease command to add it in the image.

Развертывание на Nano Server Deploying on Nano Server

В этих указаниях предполагается, что Nano Server — это операционная система для удаленного управления, в которой уже работает какая-либо версия PowerShell. These instructions assume that the Nano Server is a «headless» OS that has a version of PowerShell is already running on it. Дополнительные сведения см. в разделе о средстве создания образов Nano Server. For more information, see the Nano Server Image Builder documentation.

Двоичные файлы PowerShell можно развернуть двумя разными способами: PowerShell binaries can be deployed using two different methods.

  1. Автономно — подключите виртуальный жесткий диск Nano Server и распакуйте содержимое ZIP-файла в выбранное расположение в этом образе. Offline — Mount the Nano Server VHD and unzip the contents of the zip file to your chosen location within the mounted image.
  2. В сети — передайте ZIP-файл через сеанс PowerShell и распакуйте его в выбранное расположение. Online — Transfer the zip file over a PowerShell Session and unzip it in your chosen location.

В обоих случаях требуется ZIP-пакет выпуска Windows 10 семейства x64. In both cases, you need the Windows 10 x64 ZIP release package. Выполните команды в экземпляре PowerShell с ролью администратора. Run the commands within an «Administrator» instance of PowerShell.

Автономное развертывание PowerShell Offline Deployment of PowerShell

  1. С помощью любой служебной программы ZIP распакуйте пакет в каталог, находящийся внутри подключенного образа Nano Server. Use your favorite zip utility to unzip the package to a directory within the mounted Nano Server image.
  2. Отключите образ и загрузите его. Unmount the image and boot it.
  3. Подключитесь к встроенному экземпляру Windows PowerShell. Connect to the built-in instance of Windows PowerShell.
  4. Следуйте инструкциям, чтобы создать конечную точку удаленного взаимодействия с помощью [методики использования другого экземпляра][]. Follow the instructions to create a remoting endpoint using the «another instance technique».

Автономное PowerShell в сети Online Deployment of PowerShell

Разверните PowerShell в Nano Server, выполнив действия ниже. Deploy PowerShell to Nano Server using the following steps.

Подключитесь к встроенному экземпляру Windows PowerShell. Connect to the built-in instance of Windows PowerShell

Скопируйте файл на экземпляр Nano Server: Copy the file to the Nano Server instance

Войдите в сеанс: Enter the session

Извлеките ZIP-файл Extract the ZIP file

Если вам требуется удаленное взаимодействие на основе WSMan, следуйте инструкциям, чтобы создать конечную точку удаленного взаимодействия с помощью [методики использования другого экземпляра][]. If you want WSMan-based remoting, follow the instructions to create a remoting endpoint using the «another instance technique».

Установка в качестве глобального средства .NET Install as a .NET Global tool

Если вы уже установили пакет SDK для .NET Core, установите PowerShell как глобальное средство .NET. If you already have the .NET Core SDK installed, it’s easy to install PowerShell as a .NET Global tool.

Установщик инструмента dotnet добавляет $env:USERPROFILE\.dotnet\tools в переменную среды $env:PATH . The dotnet tool installer adds $env:USERPROFILE\.dotnet\tools to your $env:PATH environment variable. Но в выполняющейся оболочке нет обновленной переменной $env:PATH . However, the currently running shell doesn’t have the updated $env:PATH . Вы можете запустить PowerShell из новой оболочки, введя pwsh . You can start PowerShell from a new shell by typing pwsh .

Установка PowerShell через Winget Install PowerShell via Winget

Программа командной строки winget позволяет разработчикам обнаруживать, устанавливать, обновлять, удалять и настраивать приложения на компьютерах Windows 10. The winget command-line tool enables developers to discover, install, upgrade, remove, and configure applications on Windows 10 computers. Она является клиентским интерфейсом для службы Диспетчера пакетов Windows. This tool is the client interface to the Windows Package Manager service.

В настоящее время инструмент winget предоставляется в предварительной версии. The winget tool is currently a preview. Сейчас доступны не все запланированные функции. Not all planned functionality is available at this time. Не используйте этот метод в сценарии развертывания в рабочей среде. You should not use this method in a production deployment scenario. Список системных требований и инструкции по установке см. в документации по winget. See the winget documentation for a list of system requirements and install instructions.

Для установки PowerShell с помощью опубликованных пакетов winget можно использовать следующие команды: The following commands can be used to install PowerShell using the published winget packages:

Найдите последнюю версию PowerShell. Search for the latest version of PowerShell

Установите версию PowerShell, используя параметр —exact . Install a version of PowerShell using the —exact parameter

Установка из Microsoft Store Installing from the Microsoft Store

Версия PowerShell 7.1 опубликована в Microsoft Store. PowerShell 7.1 has been published to the Microsoft Store. Этот выпуск PowerShell можно найти на веб-сайте Microsoft Store или в приложении Store в ОС Windows. You can find the PowerShell release on the Microsoft Store website or in the Store application in Windows.

Пакет Microsoft Store обеспечивает следующие преимущества: Benefits of the Microsoft Store package:

  • автоматические обновления, встроенные в основной механизм Windows 10; Automatic updates built right into Windows 10
  • интеграция с другими механизмами распространения программного обеспечения, такими как Intune и SCCM. Integrates with other software distribution mechanisms like Intune and SCCM

Пакеты MSIX выполняются в песочнице приложения, которая виртуализует доступ к некоторым расположениям в файловой системе и реестре. MSIX packages run in an application sandbox that virtualizes access to some filesystem and registry locations.

  • Все изменения реестра в разделе HKEY_CURRENT_USER при записи копируются в закрытое хранилище, отдельно для каждого пользователя и приложения. All registry changes under HKEY_CURRENT_USER are copied on write to a private, per-user, per-app location. Таким образом, эти значения недоступны для других приложений. Therefore, those values are not available to other applications.
  • Параметры конфигурации системного уровня, хранящиеся в $PSHOME , нельзя изменить. Any system-level configuration settings stored in $PSHOME cannot be modified. Это относится и к конфигурации WSMAN. This includes the WSMAN configuration. Это означает, что вы не сможете подключать удаленные сеансы к установкам PowerShell на основе хранилища. This prevents remote sessions from connecting to Store-based installs of PowerShell. Поддерживаются конфигурации уровня пользователя и удаленное взаимодействие по SSH. User-level configurations and SSH remoting are supported.

Использование пакета MSIX Using the MSIX package

Предварительные сборки PowerShell включают пакет MSIX. The preview builds of PowerShell include an MSIX package. Пакет MSIX не поддерживается официально. The MSIX package is not officially supported. Этот пакет создан исключительно для тестовых целей и только на период действия предварительной версии. The package is built for testing purposes during the preview period.

Чтобы вручную установить пакет MSIX на клиенте Windows 10, скачайте пакет MSIX на странице GitHub с [выпусками][выпуски]. To manually install the MSIX package on a Windows 10 client, download the MSIX package from our GitHub [releases][releases] page. Прокрутите вниз до раздела Ресурсы в выпуске, который вы хотите установить. Scroll down to the Assets section of the Release you want to install. Раздел «Ресурсы» может быть свернут. В таком случае щелкните его, чтобы развернуть. The Assets section may be collapsed, so you may need to click to expand it.

MSIX-файл выглядит примерно так: PowerShell- -win- .msix The MSIX file looks like this — PowerShell- -win- .msix

Для установки пакета необходимо использовать командлет Add-AppxPackage . To install the package, you must use the Add-AppxPackage cmdlet.

Создание конечной точки удаленного взаимодействия How to create a remoting endpoint

PowerShell поддерживает протокол удаленного взаимодействия PowerShell (PSRP) через SSH и WSMan. PowerShell supports the PowerShell Remoting Protocol (PSRP) over both WSMan and SSH. Дополнительные сведения см. в разделе: For more information, see:

Обновление существующей установки Upgrading an existing installation

Для получения оптимального результата при обновлении используйте тот же метод установки, который вы использовали при первой установке PowerShell. For best results when upgrading, you should use the same install method you used when you first installed PowerShell. При использовании разных методов установки PowerShell устанавливается в разные расположения. Each installation method installs PowerShell in a different location. Если вы не знаете, как была выполнена установка PowerShell, вы можете сравнить расположение установки со сведениями о пакетах из этой статьи. If you are not sure how PowerShell was installed, you can compare the installed location with the package information in this article. Если установка выполнена с помощью пакета MSI, эти сведения будут отображаться в разделе Программы и компоненты Панели управления. If you installed via the MSI package, that information appears in the Programs and Features Control Panel.

Поддержка установки Installation support

Корпорация Майкрософт поддерживает методы установки, изложенные в этом документе. Microsoft supports the installation methods in this document. В других источниках могут быть доступны другие методы установки. There may be other methods of installation available from other sources. Хотя такие инструменты и методы могут работать, корпорация Майкрософт не поддерживает их. While those tools and methods may work, Microsoft cannot support those methods.

Читайте также:  Методы межпроцессного взаимодействия linux
Оцените статью