- Установка подсистемы Windows PowerShell 2.0 Installing the Windows PowerShell 2.0 Engine
- Windows 8.1 и Windows 8 On Windows 8.1 and Windows 8
- Включение .NET Framework 3.5 To turn on .NET Framework 3.5
- Включение и отключение подсистемы Windows PowerShell 2.0 To turn the Windows PowerShell 2.0 Engine on and off
- Windows Server 2012 или Windows Server 2012 R2 On Windows Server 2012 R2 and Windows Server 2012
- Добавление компонента .NET Framework 3.5 To add the .NET Framework 3.5 feature
- Добавление функции подсистемы Windows PowerShell 2.0 To add the Windows PowerShell 2.0 Engine feature
- В предыдущих версиях систем On Earlier Systems
- Запуск Windows PowerShell Starting Windows PowerShell
- В PowerShell Core есть переименованный двоичный файл PowerShell Core has renamed binary
- Запуск Windows PowerShell в более ранних версиях Windows How to Start Windows PowerShell on Earlier Versions of Windows
- Из меню «Пуск» From the Start Menu
- В командной строке At the Command Prompt
- С правами администратора (Запуск от имени администратора) With Administrative privileges (Run as administrator)
- Запуск интегрированной среды сценариев Windows PowerShell в более ранних версиях Windows How to Start Windows PowerShell ISE on Earlier Releases of Windows
- Из меню «Пуск» From the Start Menu
- В командной строке At the Command Prompt
- С правами администратора (Запуск от имени администратора) With Administrative privileges (Run as administrator)
- Включение интегрированной среды сценариев Windows PowerShell в более ранних версиях Windows How to Enable Windows PowerShell ISE on Earlier Releases of Windows
- Включение интегрированной среды сценариев Windows PowerShell Windows PowerShell (ISE) To enable Windows PowerShell Integrated Scripting Environment (ISE)
- Запуск 32-разрядной версии Windows PowerShell Starting the 32-Bit Version of Windows PowerShell
Установка подсистемы Windows PowerShell 2.0 Installing the Windows PowerShell 2.0 Engine
В этом разделе описывается установка модуля Windows PowerShell 2.0. This topic explains how to install the Windows PowerShell 2.0 Engine.
Windows PowerShell 3.0 предназначен для обратной совместимости с Windows PowerShell 2.0. Windows PowerShell 3.0 is designed to be backwards compatible with Windows PowerShell 2.0. Командлеты, поставщики, оснастки, модули и сценарии, написанные для Windows PowerShell 2.0, выполняются и в Windows PowerShell 3.0, и Windows PowerShell 4.0 без изменений. Cmdlets, providers, snap-ins, modules, and scripts written for Windows PowerShell 2.0 run unchanged in Windows PowerShell 3.0 and Windows PowerShell 4.0. Однако из-за изменений в политике активации среды выполнения в Microsoft .NET Framework 4 основные программы Windows PowerShell, написанные для Windows PowerShell 2.0 и скомпилированные с помощью среды CLR 2.0, не могут выполняться в последующих выпусках Windows PowerShell 4.0, компилируемых в среде CLR 2.0, без изменений. However, due to a change in the runtime activation policy in Microsoft .NET Framework 4, Windows PowerShell host programs that were written for Windows PowerShell 2.0 and compiled with Common Language Runtime (CLR) 2.0 cannot run without modification in later releases of Windows PowerShell, which is compiled with CLR 4.0.
Чтобы обеспечить обратную совместимость с командами и основными программами, которые были затронуты этими изменениями, подсистемы Windows PowerShell 2.0, Windows PowerShell 3.0 и Windows PowerShell 4.0 рассчитаны на параллельное выполнение. To maintain backward compatibility with commands and host programs that are affected by these changes, the Windows PowerShell 2.0, Windows PowerShell 3.0, and Windows PowerShell 4.0 engines are designed to run side-by-side. Кроме того, подсистема Windows PowerShell 2.0 входит в Windows Server 2012 R2, Windows 8.1, Windows 8, Windows Server 2012 и Windows Management Framework 3.0. Also, the Windows PowerShell 2.0 Engine is included in Windows Server 2012 R2, Windows 8.1, Windows 8, Windows Server 2012, and Windows Management Framework 3.0. Подсистема Windows PowerShell 2.0 предназначена для использования только в том случае, если выполнение существующего сценария или существующей основной программы невозможно из-за несовместимости с Windows PowerShell 3.0, Windows PowerShell 4.0 или Microsoft .NET Framework 4. The Windows PowerShell 2.0 Engine is intended to be used only when an existing script or host program cannot run because it is incompatible with Windows PowerShell 3.0, Windows PowerShell 4.0, or Microsoft .NET Framework 4. Такие ситуации довольно редки. Such cases are expected to be rare.
Обработчик Windows PowerShell 2.0 представляет собой дополнительный компонент Windows Server 2012 R2, Windows 8.1, Windows® 8 и Windows Server® 2012. The Windows PowerShell 2.0 Engine is an optional feature of Windows Server 2012 R2, Windows 8.1, Windows® 8 and Windows Server® 2012. В более ранних версиях Windows при установке Windows Management Framework 3.0 установка Windows PowerShell 3.0 полностью заменяет установку Windows PowerShell 2.0 в каталоге установки Windows PowerShell. On earlier versions of Windows, when you install Windows Management Framework 3.0, the Windows PowerShell 3.0 installation completely replaces the Windows PowerShell 2.0 installation in the Windows PowerShell installation directory. При этом подсистема Windows PowerShell 2.0 сохраняется. However, the Windows PowerShell 2.0 Engine is retained.
Дополнительные сведения о запуске подсистемы Windows PowerShell 2.0 см. в статье Запуск подсистемы Windows PowerShell 2.0. For information about starting the Windows PowerShell 2.0 Engine, see Starting the Windows PowerShell 2.0 Engine.
Windows 8.1 и Windows 8 On Windows 8.1 and Windows 8
В Windows 8.1 и Windows 8 функция подсистемы Windows PowerShell 2.0 по умолчанию включена. On Windows 8.1 and Windows 8, the Windows PowerShell 2.0 Engine feature is turned on by default. Однако для его использования следует включить параметр для необходимой ему платформы Microsoft .NET Framework 3.5. However, to use it, you need to turn on the option for Microsoft .NET Framework 3.5, which it requires. Этот раздел также поясняет, как включать и отключить компонент подсистемы Windows PowerShell 2.0. This section also explains how to turn the Windows PowerShell 2.0 Engine feature on and off.
Включение .NET Framework 3.5 To turn on .NET Framework 3.5
На экране Пуск введите компоненты Windows. On the Start screen, type Windows Features.
В панели Приложения щелкните Параметры , а затем выберите Включение или отключение компонентов Windows. On the Apps bar, click Settings , and then click Turn Windows features on or off.
В поле Компоненты Windows выберите элемент .NET Framework 3.5 (включает .NET 2.0 и 3.0). In the Windows Features box, click .NET Framework 3.5 (includes .NET 2.0 and 3.0 to select it.
При выборе элемента .NET Framework 3.5 (включает .NET 2.0 и 3.0) поле заливается, указывая, что выбрана только часть компонента. When you select .NET Framework 3.5 (includes .NET 2.0 and 3.0 , the box fills to indicate that only part of the feature is selected. Этого достаточно для подсистемы Windows PowerShell 2.0. However, this is sufficient for the Windows PowerShell 2.0 Engine.
Включение и отключение подсистемы Windows PowerShell 2.0 To turn the Windows PowerShell 2.0 Engine on and off
На экране Пуск введите компоненты Windows. On the Start screen, type Windows Features.
В панели Приложения щелкните Параметры , а затем выберите Включение или отключение компонентов Windows. On the Apps bar, click Settings , and then click Turn Windows features on or off.
В поле Компоненты Windows разверните узел Windows PowerShell 2.0 и установите либо снимите флажок Windows PowerShell 2.0 Engine. In the Windows Features box, expand the Windows PowerShell 2.0 node, and click the Windows PowerShell 2.0 Engine box to select or clear it.
Windows Server 2012 или Windows Server 2012 R2 On Windows Server 2012 R2 and Windows Server 2012
Для добавления подсистемы Windows PowerShell 2.0 и компонентов Microsoft .NET Framework 3.5 используйте описанные ниже процедуры. Use the following procedures to add the Windows PowerShell 2.0 Engine and Microsoft .NET Framework 3.5 features. Подсистеме Windows PowerShell 2.0 требуется Microsoft .NET Framework версии не ниже 2.0.50727. The Windows PowerShell 2.0 Engine requires Microsoft .NET Framework 2.0.50727 at a minimum. Этому требованию удовлетворяет Microsoft .NET Framework 3.5. This requirement is fulfilled by Microsoft .NET Framework 3.5.
Добавление компонента .NET Framework 3.5 To add the .NET Framework 3.5 feature
В меню Управление****диспетчера сервера выберите Добавить роли и компоненты. In Server Manager , from the Manage menu, select Add Roles and Features.
Можно также выбрать Все серверы в диспетчере сервера , щелкнуть имя сервера правой кнопкой мыши и выбрать Добавить роли и компоненты. Or in Server Manager , click All Servers , right-click a server name, and then select Add Roles and Features.
На странице Тип установки выберите Установка ролей или компонентов. On the Installation Type page, select Role-based or feature-based installation.
На странице Компоненты разверните узел Компоненты .NET Framework 3.5 и выберите команду .NET Framework 3.5 (включает .NET 2.0 и 3.0). On the Features page, expand the .NET 3.5 Framework Features node and select .NET Framework 3.5 (includes .NET 2.0 and 3.0).
Другие параметры в этом узле для подсистемы Windows PowerShell 2.0 не требуются. The other options under that node are not required for the Windows PowerShell 2.0 Engine.
Добавление функции подсистемы Windows PowerShell 2.0 To add the Windows PowerShell 2.0 Engine feature
В меню Управление****диспетчера сервера выберите Добавить роли и компоненты. In Server Manager , from the Manage menu, select Add Roles and Features.
Можно также щелкнуть Все серверы в диспетчере сервера , щелкнуть имя сервера правой кнопкой мыши и выбрать Добавить роли и компоненты. Or Server Manager , click All Servers , right-click a server name, and then select Add Roles and Features.
На странице Тип установки выберите Установка ролей или компонентов. On the Installation Type page, select Role-based or feature-based installation.
На странице Компоненты раскройте Windows PowerShell (установлено) и выберите пункт Подсистема Windows PowerShell 2.0. On the Features page, expand the Windows PowerShell (Installed) node and select Windows PowerShell 2.0 Engine.
Дополнительные сведения о запуске подсистемы Windows PowerShell 2.0 см. в статье Запуск подсистемы Windows PowerShell 2.0. For information about starting the Windows PowerShell 2.0 Engine, see Starting the Windows PowerShell 2.0 Engine.
В предыдущих версиях систем On Earlier Systems
Пакет Windows Management Framework 4.0, устанавливающий Windows PowerShell 4.0 в Windows 7, Windows Server 2008 R2 и Windows Server 2012, включает подсистему Windows PowerShell 2.0. The Windows Management Framework 4.0 package that installs Windows PowerShell 4.0 on Windows 7, Windows Server 2008 R2, and Windows Server 2012, includes the Windows PowerShell 2.0 Engine. Подсистема Windows PowerShell 2.0 включена и готова к использованию без дополнительной установки, настройки или конфигурации. The Windows PowerShell 2.0 Engine is enabled and ready to use, if necessary, without additional installation, setup, or configuration.
Пакет Windows Management Framework 3.0, устанавливающий Windows PowerShell 3.0 в Windows 7, Windows Server 2008 R2 и Windows Server 2008, включает подсистему Windows PowerShell 2.0. The Windows Management Framework 3.0 package that installs Windows PowerShell 3.0 on Windows 7, Windows Server 2008 R2, and Windows Server 2008, includes the Windows PowerShell 2.0 Engine. Подсистема Windows PowerShell 2.0 включена и готова к использованию без дополнительной установки, настройки или конфигурации. The Windows PowerShell 2.0 Engine is enabled and ready to use, if necessary, without additional installation, setup, or configuration.
Запуск Windows PowerShell Starting Windows PowerShell
Windows PowerShell — это обработчик скриптов .DLL , который внедрен в несколько узлов. Windows PowerShell is a scripting engine .DLL that’s embedded into multiple hosts. Самый распространенный запускаемый узел — интерактивная командная строка powershell.exe и интерактивная среда скриптов powershell_ise.exe . The most common hosts you’ll start are the interactive command-line powershell.exe and the Interactive Scripting Environment powershell_ise.exe .
Информацию о запуске Windows PowerShell® в Windows Server® 2012 R2, Windows® 8.1, Windows Server 2012 и Windows 8 см. в статье Общие задачи управления и навигации в Windows. To start Windows PowerShell® on Windows Server® 2012 R2, Windows® 8.1, Windows Server 2012, and Windows 8, see Common Management Tasks and Navigation in Windows.
В PowerShell Core есть переименованный двоичный файл PowerShell Core has renamed binary
PowerShell Core, или PowerShell, имеет версию 6 и выше с открытым исходным кодом и использует .NET Core. PowerShell Core, referred to as PowerShell, is version 6 and higher that’s open source and uses .NET Core. Поддерживаемые версии доступны в Windows, macOS и Linux. Supported versions are available on Windows, macOS, and Linux.
Начиная с PowerShell 6 двоичный файл PowerShell был переименован в pwsh.exe для Windows и pwsh для macOS и Linux. Beginning in PowerShell 6, the PowerShell binary was renamed pwsh.exe for Windows and pwsh for macOS and Linux. Вы можете запустить предварительную версию PowerShell с помощью pwsh-preview . You can start PowerShell preview versions using pwsh-preview . Дополнительные сведения см. в разделе Новые возможности в PowerShell Core 6.0 и Сведения о pwsh. For more information, see What’s New in PowerShell Core 6.0 and About pwsh.
Чтобы найти справку по командлетам и документацию по установке для PowerShell 7, воспользуйтесь следующими ссылками: To find cmdlet reference and installation documentation for PowerShell 7, use the following links:
Документ Document | Ссылка Link |
---|---|
Справка по командлетам Cmdlet reference | Обозреватель модулей PowerShell PowerShell Module Browser |
Установка в Windows Windows installation | Установка PowerShell Core в Windows Installing PowerShell Core on Windows |
Установка в macOS macOS installation | Установка PowerShell Core в macOS Installing PowerShell Core on macOS |
Установка в Linux Linux installation | Установка PowerShell Core в Linux Installing PowerShell Core on Linux |
Сведения о других версиях PowerShell см. в документации по использованию PowerShell. To view content for other PowerShell versions, see How to use the PowerShell documentation.
Запуск Windows PowerShell в более ранних версиях Windows How to Start Windows PowerShell on Earlier Versions of Windows
В этом разделе объясняется, как запустить Windows PowerShell и интегрированную среду скриптов Windows PowerShell (ISE) в Windows® 7, Windows Server® 2008 R2 и Windows Server® 2008. This section explains how to start Windows PowerShell and Windows PowerShell Integrated Scripting Environment (ISE) on Windows® 7, Windows Server® 2008 R2, and Windows Server® 2008. Кроме того, здесь поясняется, как включить дополнительный компонент Windows PowerShell ISE в Windows PowerShell 2.0 в ОС Windows Server® 2008 R2 и Windows Server® 2008. It also explains how to enable the optional feature for Windows PowerShell ISE in Windows PowerShell 2.0 on Windows Server® 2008 R2 and Windows Server® 2008.
Используйте любой из следующих методов для запуска установленной версии Windows PowerShell 3.0 или Windows PowerShell 4.0, где это возможно. Use any of the following methods to start the installed version of Windows PowerShell 3.0, or Windows PowerShell 4.0, where applicable.
Из меню «Пуск» From the Start Menu
- Нажмите кнопку Пуск , введите PowerShell и выберите Windows PowerShell. Click Start , type PowerShell , and then click Windows PowerShell.
- В меню Пуск выберите Пуск , Все программы , Стандартные , откройте папку Windows PowerShell и щелкните Windows PowerShell. From the Start menu, click Start , click All Programs , click Accessories , click the Windows PowerShell folder, and then click Windows PowerShell.
В командной строке At the Command Prompt
В cmd.exe , Windows PowerShell или интегрированной среде сценариев Windows PowerShell для запуска Windows PowerShell введите следующее: In cmd.exe , Windows PowerShell, or Windows PowerShell ISE, to start Windows PowerShell, type:
Можно также использовать параметры программы powershell.exe для настройки сеанса. You can also use the parameters of the powershell.exe program to customize the session. Дополнительные сведения см. в статье Справка по командной строке PowerShell.exe. For more information, see PowerShell.exe Command-Line Help.
С правами администратора (Запуск от имени администратора) With Administrative privileges (Run as administrator)
Нажмите кнопку Пуск , введите PowerShell , щелкните правой кнопкой мыши Windows PowerShell и выберите пункт Запуск от имени администратора. Click Start , type PowerShell , right-click Windows PowerShell , and then click Run as administrator.
Запуск интегрированной среды сценариев Windows PowerShell в более ранних версиях Windows How to Start Windows PowerShell ISE on Earlier Releases of Windows
Используйте один из следующих методов для запуска интегрированной среды сценариев Windows PowerShell. Use any of the following methods to start Windows PowerShell ISE.
Из меню «Пуск» From the Start Menu
- Нажмите кнопку Пуск , введите Интегрированная среда сценариев и выберите Интегрированная среда сценариев Windows PowerShell. Click Start , type ISE , and then click Windows PowerShell ISE.
- В меню Пуск выберите Пуск , Все программы , Стандартные , откройте папку Windows PowerShell и щелкните Интегрированная среда сценариев Windows PowerShell. From the Start menu, click Start , click All Programs , click Accessories , click the Windows PowerShell folder, and then click Windows PowerShell ISE.
В командной строке At the Command Prompt
В cmd.exe , Windows PowerShell или интегрированной среде сценариев Windows PowerShell для запуска Windows PowerShell введите следующее: In cmd.exe , Windows PowerShell, or Windows PowerShell ISE, to start Windows PowerShell, type:
С правами администратора (Запуск от имени администратора) With Administrative privileges (Run as administrator)
Нажмите кнопку Пуск , введите Интегрированная среда сценариев , щелкните правой кнопкой мыши Интегрированная среда сценариев Windows PowerShell и выберите пункт Запуск от имени администратора. Click Start , type ISE , right-click Windows PowerShell ISE , and then click Run as administrator.
Включение интегрированной среды сценариев Windows PowerShell в более ранних версиях Windows How to Enable Windows PowerShell ISE on Earlier Releases of Windows
При использовании Windows PowerShell 4.0 и Windows PowerShell 3.0 интегрированная среда сценариев Windows PowerShell по умолчанию включена во всех версиях Windows. In Windows PowerShell 4.0 and Windows PowerShell 3.0, Windows PowerShell ISE is enabled by default on all versions of Windows. Если она еще не включена, Windows Management Framework 4.0 или Windows Management Framework 3.0 включает ее. If it isn’t already enabled, Windows Management Framework 4.0 or Windows Management Framework 3.0 enables it.
При использовании Windows PowerShell 2.0 интегрированная среда сценариев Windows PowerShell по умолчанию включена в Windows 7. In Windows PowerShell 2.0, Windows PowerShell ISE is enabled by default on Windows 7. В Windows Server 2008 R2 и Windows Server 2008 эта функция является дополнительной. However, on Windows Server 2008 R2 and Windows Server 2008, it’s an optional feature.
Чтобы включить интегрированную среду сценариев Windows PowerShell для Windows PowerShell 2.0 в Windows Server 2008 R2 или Windows Server 2008, выполните указанные ниже действия. To enable Windows PowerShell ISE in Windows PowerShell 2.0 on Windows Server 2008 R2 or Windows Server 2008, use the following procedure.
Включение интегрированной среды сценариев Windows PowerShell Windows PowerShell (ISE) To enable Windows PowerShell Integrated Scripting Environment (ISE)
- Запустите диспетчер серверов. Start Server Manager.
- Щелкните Компоненты и выберите Добавить компоненты. Click Features and then click Add Features.
- В меню «Выберите компоненты» щелкните интегрированную среду сценариев Windows PowerShell. In Select Features, click Windows PowerShell Integrated Scripting Environment (ISE).
Запуск 32-разрядной версии Windows PowerShell Starting the 32-Bit Version of Windows PowerShell
При установке Windows PowerShell на 64-разрядном компьютере в дополнение к 64-разрядной версии устанавливается Windows PowerShell (x86) — 32-разрядная версия Windows PowerShell. When you install Windows PowerShell on a 64-bit computer, Windows PowerShell (x86) , a 32-bit version of Windows PowerShell is installed in addition to the 64-bit version. При открытии Windows PowerShell по умолчанию запускается 64-разрядная версия. When you run Windows PowerShell, the 64-bit version runs by default.
Однако в некоторых случаях нужно запустить Windows PowerShell (x86) , например при использовании модуля, которому требуется 32-разрядная версия, или при удаленном подключении к 32-разрядному компьютеру. However, you might occasionally need to run Windows PowerShell (x86) , such as when you’re using a module that requires the 32-bit version or when you’re connecting remotely to a 32-bit computer.
Для запуска 32-разрядной версии Windows PowerShell воспользуйтесь любой из следующих процедур. To start a 32-bit version of Windows PowerShell, use any of the following procedures.