Windows powershell для windows xp sp3

PowerShell - это современная замена командной строки в Windows, альтернатива Bash от Microsoft ...


Windows Server, Windows Vista, Windows XP, Программное обеспечение

  • 19.03.2018
  • 16 749
  • 9
  • 04.10.2021
  • 38
  • 37
  • 1

Устанавливаем PowerShell в старых версиях Windows

  • Содержание статьи
    • Установка PowerShell в Windows
    • Комментарии к статье ( 9 шт )
    • Добавить комментарий

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

PowerShell — это современная замена командной строки в Windows, альтернатива Bash от Microsoft и просто мощный инструмент в умелых руках. Тем не менее, есть он далеко не во всех операционных системах Windows — первой операционной системой, в которой был встроен PowerShell, была Windows 7. К счастью, установить его можно и на более старые системы — такие как Windows XP, Vista и их серверные аналоги. Делается это с помощью установки комплекта Windows Management Framework.

Программная часть компьютера при этом должна соответствовать следующим требованиям:

Операционная система:
Windows XP с установленным Service Pack 3
Windows Server 2003 с установленными Service Pack 2
Windows Vista с установленными Service Pack 1 или Service Pack 2
Windows Server 2008 с установленными Service Pack 1 или Service Pack 2

Установленный Microsoft .NET Framework 2 (так же подходит .NET Framework 3 и .NET Framework 3.5).

Скачать обновления для нужной операционной системы, содержащие в себе Windows Management Framework, в том числе Windows PowerShell 2.0 и WinRM 2.0 можно по следующим ссылкам:

Windows XP и Windows Embedded (обновление KB968930):

  • Скачать с Каталога Центра обновлений Майкрософт (для русской версии)
  • Скачать с Каталога Центра обновлений Майкрософт (для английской версии)

Windows Server 2003 (обновление KB968930):

  • Скачать с Каталога Центра обновлений Майкрософт (для русской версии)
  • Скачать с Каталога Центра обновлений Майкрософт (для английской версии)

Windows Server 2003 x64 (обновление KB968930):

  • Скачать с Каталога Центра обновлений Майкрософт (для русской версии)
  • Скачать с Каталога Центра обновлений Майкрософт (для английской версии)

Windows Vista (обновление KB968930):

  • Скачать с официального сайта Microsoft

Windows Vista x64 (обновление KB968930):

  • Скачать с официального сайта Microsoft

Windows Server 2008 (обновление KB968930):

  • Скачать с официального сайта Microsoft

Windows Server 2008 x64 (обновление KB968930):

  • Скачать с официального сайта Microsoft

После установки, исполняемый файл PowerShell можно будет найти по адресу C:WINDOWSsystem32WindowsPowerShellv1.0, а так же в меню Пуск.

January 28th, 2011

Summary: Learn how to install Windows PowerShell 2.0 on Windows XP, and how to distribute files between two folders.

In this Post:

  • Where Can I Download Windows PowerShell 2.0 for Windows XP?
  • How to Distribute Files Between Folders

Where Can I Download Windows PowerShell 2.0 for Windows XP?

Hey, Scripting Guy! Question

Hey, Scripting Guy! I’m new to Windows PowerShell. Currently, I am using Windows XP. I have had no luck with downloading Windows PowerShell for Windows XP yet. Could you please give me a specific link so that I can download it? Many thanks.

— KB

Hey, Scripting Guy! Answer

Hello KB,

Microsoft Scripting Guy Ed Wilson is here. I am sorry you are having a problem downloading and installing Windows PowerShell 2.0 for Windows XP. This is the download page for Windows PowerShell 2.0. Unfortunately, it is not called “Download page for Windows PowerShell 2.0”; it is called TechNet Support Article 968929, and the title on the page says Windows Management Framework. I guess the only clue is the stuff in the parentheses where it says Windows PowerShell 2.0, WinRM 2.0, and Bits 4.0.

After you get to the download page, you will need to go all the way down to the bottom of the page. This is because this page contains links to all of the different packages that are required for everything from Windows Server 2008 to Windows Vista 64-bit. The package you want is a bit confusing, because it is for both Windows XP and Windows embedded. (To be honest, when the Scripting Wife asked me if it was the right package, I was not entirely certain. I just told her to download it and to try it, hoping that it would include a version check and that the installation would fail, if it were the wrong package). I have included a picture that points to the exact package you want.

Image of download link location on Windows PowerShell 2.0 download page

My wife, the Scripting Wife, also had a bit of difficulty downloading and installing Windows PowerShell 2.0. You may want to take a look at her article, as it goes through the process step by step.

After you get it up and running, you may want to look at all the Scripting Wife articles, because she details her experience getting ready for the 2010 Scripting Games. She was an accountant, and though she is knowledgeable about computers, she is not a computer professional. Start at the beginning of the articles and read them forward. They kind of become her scripting diary.

Hope this helps.

How to Distribute Files Between FoldersHey, Scripting Guy! Question

Hey, Scripting Guy! Hello, maybe you can help me out. I am desperate. This is probably a stupid question, but I am currently trying to write a script that copies files from one source directory based on the number of files in the source to two different directory destinations. For example, if I have eight files in the source directory (A), I want to copy four of the eight files in destination directory (B) and copy the other four files in destination directory (C). I cannot seem to figure this out anywhere! I currently have this as my script.

CopyFiles_DoesNotWork.ps1

# Define source directory and destination directories to copy files:

$SQL01=»C:SQL01Source»

$DESTSQL02=»C:SQL02″

$DESTSQL03=»C:SQL03″

# Get directory items number and divide number received:

(get-childitem $SQL01).count /2

#Copy items to destination folders:

copy-item $SQL01 $DESTSQL02 -recurse

I am stuck! Your help would be greatly appreciated!

— JT

Hey, Scripting Guy! Answer

Hello JT,

The first thing I needed to do was to create a couple of folders (a, b, and c off the root). After I did that, I needed to create eight files. I used this line of code to create my eight files:

1..8 | % {New-Item -Path «c:a» -ItemType file -Name «file$_» -Value «file$_»}

After I created my test environment, it was a simple matter of writing a quick script to copy the files. It is significant that you said you wanted to copy the files, instead of moving them. With a copy, you will still have your eight original files in the original location, and in your two destination folders, you will have a copy of the first four files, and a copy of the second four files in the second destination folder. The trick to accomplishing your task is to add a bit of logic to the code so that it will know how many files have been copied to the first destination folder. When half of the files have been copied to the first destination, the script needs to switch to using the second destination folder. Whenever I have a script that needs to make a decision, I use a decision type of code structure—in this example, it is an If/Else type of code.

JT, I wrote the DivideAndCopyFiles.ps1 script to illustrate using this type of technique in your situation. The complete script appears here.

DivideAndCopyFiles.ps1

$source = «C:a»

$destination1 = «c:b»

$destination2 = «C:c»

$i = 1

$files = Get-ChildItem -Path $source -Recurse

Foreach($file in $files)

{

if($i -le $files.count/2)

{ Copy-Item -Path $file.fullname -Destination $destination1 }

Else

{ Copy-Item -Path $file.fullname -Destination $destination2 }

$i++

}

In the first section of the script, I declare a bunch of variables. These are pretty self-explanatory, except for the $i variable. The $i variable is a counter variable that is used to keep track of our progress in copying the files. It is important to initialize it to the value of 1, because if it were not initialized and the script were run a second time in the Windows PowerShell ISE, the script would not work properly because of the counter value being greater than the number of files in the collection. The variable portion of the script is shown here:

$source = «C:a»

$destination1 = «c:b»

$destination2 = «C:c»

$i = 1

Next, I gather up all of the files from the source folder. To do this, I use the Get-ChildItem cmdlet. I store the returned objects in the $files variable. The recurse parameter is used to tell the Get-ChildItem cmdlet to retrieve items that may reside in a subdirectory. This command appears here:

$files = Get-ChildItem -Path $source -Recurse

Next, I use the foreach statement to walk through the collection of objects that are stored in the $files variable. The $file variable is used to keep my place in the collection of files. Following the foreach statement, I open the script block by using a curly bracket (brace). This portion of the script appears here:

Foreach($file in $files)

{

The next thing I need to do is to add a bit of logic. The If statement is used to evaluate a condition. The condition I am interested in is if the value of the variable $i is less than or equal to half of the total number of files in the $files collection. Luckily, the count property exists to tell me how many files I have to work with. As long as the number of files is less than half, I copy the files to the path stored in the $destination1 variable. If the value of the $i variable is greater than half the number of files in the $files variable, I copy them to the path stored in the $destination2 variable.

When I am copying files, I need to supply the path parameter with the path to the file that is to be copied. The fullname property of a fileinfo object contains the file name, as well as the path to the file. When I am using the Copy-Item cmdlet, I do not need to specify a file name on the destination side of things because the cmdlet is smart enough to obtain that. All I need to do is to give it the destination folder. This portion of the script appears here:

if($i -le $files.count/2)

{ Copy-Item -Path $file.fullname -Destination $destination1 }

Else

{ Copy-Item -Path $file.fullname -Destination $destination2 }

Finally, after copying a file, I increment the value of the $i variable and close out the script block:

$i++

}

Well, this concludes another edition of Quick-Hits Friday. Join me tomorrow for the Weekend Scripter as I delve into the mysteries of using the Write-Progress cmdlet.

I would love you to follow me on Twitter and Facebook. If you have any questions, send email to me at scripter@microsoft.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.

Ed Wilson, Microsoft Script
ing Guy

Как известно в апреле 2014 года Microsoft отправила на заслуженную пенсию Windows XP. Но пользователи продолжают ею активно пользоваться, не только дома, но и на предприятиях.

Сегодняшняя небольшая заметка будет посвящена тому, как установить Powershell на компьютер под управлением Windows XP (SP3) быстро и с минимальными телодвижениями  (т.е. удалённо) и что самое главное – незаметно для пользователя, работающего за этим компьютером. В принципе ничего нового, просто как небольшая памятка о том, с чем самому на днях пришлось столкнуться 🙂

Для осуществления нашего хитрого плана необходимо обладать правами административными правами на удалённой машине.

Для того, чтобы на компьютере с Windows XP заработал Powershell необходимо не него установить .Net Framework и собственно сам Powershell.

Если на предприятии развёрнут WSUS всё будет намного проще, или если компьютер проходил через WSUS Offline Update, то в зависимости от его настроек всё уже может быть установлено. Мне пришлось пойдём самым хардкорным путём, поэтому далее будет описано как вести себя, в случае когда нет ни того, не другого.

Итак, для начала необходимо скачать .NET Framework и Powershell. Также будет необходима утилита удалённой командной строки от Sysinternals – PsExec.

Для начала необходимо скопировать файлы установки .Net Framework и Powershell на удалённый компьютер. В принципе у PsExec есть параметр –c, позволяющий  скопировать файл в подкаталог system32 удаленной системы. Я предпочитаю копировать вручную в другой каталог. После того как файлы скопированы подключаемся к удалённому компьютеру командой

psexec.exe \ComputerName cmd

и переходим в каталог, где лежат наши файлы. Например:

cd C:temp

Чтобы убедиться в том, что мы перешли в нужный каталог (а заодно и уточнить имена запускаемых файлов) можно просмотреть содержимое данного каталога (по команде dir).

Запускаем установку .NET Framework:

“Microsoft .NET Framework v3.5 SP1 Final.exe” /quiet /norestart /lang:RUS

После завершения установки аналогичным способом устанавливаем Powershell:

WindowsXP-KB968930-x86-RUS.exe /quiet /norestart

Выходим из удалённой командной строки по команде exit.

Для завершения установки необходимо перегрузить машину.

На этом установка заканчивается. На удалённый компьютер установлен Powershell. Но для того, чтобы к нему можно было удалённо подключаться через Powershell на нём необходимо разрешить удалённые подключения. Снова подключаемся к удалённой жертве (практика показала, что для выполнения этой операции нужно подключаться из под системной учётной записи, добавив к PsExec параметр –s) и выполняем необходимые настройки:

psexec.exe \ComputerName cmd –s
winrm qc

После чего пару раза нажать Y отвечая на вопросы (подтвердить свои намерения). Кстати, скорее всего прочесть выводимые сообщения не удастся из-за кодировки. Но если очень хочется (или вдруг что-то пошло не так и вылезла ошибка) я пользовался онлайн декодером.

На этом установка и настройка Powershell на удалённом компьютере завершена.

Если интересно, что выполняет последняя (как и любая предыдущая) команда  в конце команды нужно дописать параметр вызова справки: /?.

На всякий случай напомню, что если компьютеры не входят в домен, то на компьютере, с которого будем подключаться нужно добавить удалённый компьютер в список доверенных узлов. Все (а может быть не все) тонкости этой операции рассматриваются здесь.

В завершение ещё пара моментов, которые так кстати подвернулись (сам не проверял, но на всякий случай пусть будет):

Для пользователей Windows Vista и Windows 7, работающим не от имени встроенного администратора, нужно выполнить команду:

reg add HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f

По умолчанию, установлено ограничение на 5 одновременных соединений WinRM от клиента. Если кому-то вдруг этого мало увеличить это количество можно командой:

winrm s winrm/config/winrs @{MaxShellsPerUser=»X»}

где X – новое значение максимального количества одновременных подключений.

Archived Forums 901-920

 > 

Windows PowerShell

  • Question

  • Question

    Sign in to vote

    0


    Sign in to vote

    Can PowerShell V3 be installed on Windows XP ?

    Wednesday, July 31, 2013 4:01 PM

Answers

  • Question

    Sign in to vote

    1


    Sign in to vote

    Nope.

    http://www.microsoft.com/en-us/download/details.aspx?id=34595

    http://blogs.msdn.com/b/powershell/archive/2012/09/17/windows-management-framework-3-0-available-for-download.aspx?Redirected=true


    Don’t retire TechNet!

    • Marked as answer by
      Larry Weiss
      Wednesday, July 31, 2013 4:42 PM

    Wednesday, July 31, 2013 4:09 PM

Windows PowerShell

Free

It enables developers control the administration of Windows and applications

Microsoft Windows PowerShell is a new command-line shell and scripting language designed for system administration and automation. Built on the .NET Framework, Windows PowerShell enables IT professionals and developers control and automate the administration of Windows and applications.

Screenshots

MainWidow

ISE - Success

ISE - No Permission to Run Script

Windows Powershell Version 2.0

Help

Powershell Command

HELP

Info updated on:
Feb 04, 2023

Related stories

Windows 10: no Guests allowed

Get rid of default apps in Windows 10


Related software

FREE

Java SE Development Kit

rating

Create Java applications that run on all operating systems.

FREE

Windows Azure Command Line Tools

rating

Command Line Tools provides a set of open source, cross-platform commands.

FREE

Janotech Unix Shell

rating

Provides a complete Unix-like programming environment for the Windows OS.

BBC BASIC for Windows

rating

Advanced implementation of BBC BASIC for PCs.

Sysax FTP Automation

rating

Secure file transfer automation and synchronization with email notification.

Windows Azure PowerShell for Node.js

rating

Implements a simple web application in Node.js using a popular web framework

быдлокодер

1722 / 909 / 106

Регистрация: 04.06.2008

Сообщений: 5,644

1

17.03.2017, 20:27. Показов 4554. Ответов 13


Друзья! На официальном сайте максимум, что будет, это описание, а непосредственно ссылки на скачивание уже нет. А мне кровь из носа нужна, для установки MS SQL Server 2008. Не завалялось ли у кого оригинального дистрибутива для XP3 SP3 32 Home русскоязычной? Спасибо, кто откликнется.



0



быдлокодер

1722 / 909 / 106

Регистрация: 04.06.2008

Сообщений: 5,644

17.03.2017, 21:07

 [ТС]

3

DamNet, по первым двум ссылкам те самые описания и есть, от которых я говорил. Это просто описания, они бесполезны. А по третьей можно, наверное скачать, но не для моей оси.



0



10565 / 5529 / 864

Регистрация: 07.04.2013

Сообщений: 15,660

17.03.2017, 21:25

4



0



быдлокодер

1722 / 909 / 106

Регистрация: 04.06.2008

Сообщений: 5,644

17.03.2017, 21:29

 [ТС]

5

vavun, это не то, это вот что такое:

Пакет Windows Management Framework Core предоставляет ИТ-специалистам обновленную функцию управления.

Он содержит следующие компоненты: Windows PowerShell 2.0 и службу удаленного управления Windows (WinRM) версии 2.0

а мне нужно 1.0



0



10565 / 5529 / 864

Регистрация: 07.04.2013

Сообщений: 15,660

17.03.2017, 21:33

6

Цитата
Сообщение от kravam
Посмотреть сообщение

а мне нужно 1.0

Поставьте и проверите нужен ли именно первый, или минимум первый



0



быдлокодер

1722 / 909 / 106

Регистрация: 04.06.2008

Сообщений: 5,644

17.03.2017, 21:37

 [ТС]

7

Цитата
Сообщение от vavun
Посмотреть сообщение

Поставьте и проверите нужен ли именно первый, или минимум первый

Оно, может, и заработает, я успокоюсь, а через месяц-другой, или даже через год, когда я обрасту настойками, всякими, вдруг даст сбой. На что грешить? Или я что не так сделал, или версию не ту поставил, как определить? Никак. Нет, сказано 1.0, значит, 1.0.



0



6 / 6 / 0

Регистрация: 04.03.2017

Сообщений: 23

17.03.2017, 23:19

8

там же внизу статьи прямые ссылки на скачивание

Windows PowerShell 1.0 English-Language Installation Package for Windows XP x64 Edition (KB926139)
https://www.microsoft.com/en-u… px?id=1380



0



быдлокодер

1722 / 909 / 106

Регистрация: 04.06.2008

Сообщений: 5,644

17.03.2017, 23:21

 [ТС]

9

Цитата
Сообщение от DamNet
Посмотреть сообщение

x64

Цитата
Сообщение от kravam
Посмотреть сообщение

32

невнимательны вы.



0



6 / 6 / 0

Регистрация: 04.03.2017

Сообщений: 23

17.03.2017, 23:38

10

как я понял, тебе нужен файл windowsxp-kb926139-v2-x86-enu.exe
он входит в состав Microsoft SQL Server 2008 R2, который можно найти на торентах…



1



быдлокодер

1722 / 909 / 106

Регистрация: 04.06.2008

Сообщений: 5,644

17.03.2017, 23:42

 [ТС]

11

DamNet, ищу. Вопрос открыт.



0



6 / 6 / 0

Регистрация: 04.03.2017

Сообщений: 23

18.03.2017, 00:25

12



0



быдлокодер

1722 / 909 / 106

Регистрация: 04.06.2008

Сообщений: 5,644

18.03.2017, 01:14

 [ТС]

13

DamNet, тогда уж вот здесь взять.
https://www.microsoft.com/ru-r… x?id=30438
На эту версию наложены незначительные для меня ограничения. А ты не знаешь, что такое R2?



0



6 / 6 / 0

Регистрация: 04.03.2017

Сообщений: 23

18.03.2017, 15:32

14

kravam, это экспресс версия, там может и не быть (точнее даже там скорее всего нет) повершелла.
R2 = Release 2
разница версий: https://msdn.microsoft.com/lib… l.15).aspx

Поэтому лучше все таки скачать стандратный



1



Автоматизировать управление ОС Windows и других приложений .

Microsoft Windows PowerShell 1.0 for Windows XP Рейтинг редакции

FromMicrosoft: Microsoft Windows PowerShell 1.0 для Windows XP является новым оболочка командной строки и язык сценариев для системного администрирования и автоматизации. Она включает в себя более 130 средства командной строки (они называются «командлетами») для выполнения общих задач системного администрирования, таких как управление услуг, процессов, журналы событий, сертификатов, реестра и с помощью инструментария управления Windows (WMI). Средства командной строки предназначены для проста в освоении и проста в использовании со стандартными соглашениями об именах и общими параметрами, и простых инструментов для сортировки, фильтрации и форматирования данных и объектов .
Скачать (1.61MB)

Similar Suggested Software

Intel System Studio

Определите узкие места в производительности, уменьшите потребление энергии и быстрее переходите от прототипа к продукту

Image of greg shultz

on

May 30, 2007, 12:00 AM PDT

Get started with Windows PowerShell 1.0 for Windows XP Pro

Windows PowerShell is a new scripting tool that allows you to perform simple or complex tasks from a centralized interface. Here’s how to add this new extension to your Windows XP Pro system.

Microsoft planned to add a new command-line interface and
scripting language (code name “Monad”) to Windows Vista but decided
to make it a standalone utility called Windows PowerShell
1.0. It is designed primarily for system administrators, but it also provides
benefits to home and small business network users using the Professional OS.
Users can add Windows PowerShell to Windows XP, Windows
Server 2003, and Windows Vista.

Rather than being composed of a series of standalone
commands, Windows PowerShell is made up of object-oriented
programs called cmdlets (pronounced “command
lets”), which can only run from within the PowerShell
command interface. Cmdlets perform a single task and
are designed to work together to perform more complex tasks.

In order to take advantage of Windows PowerShell
on your Windows XP Pro machine, you must download and install it. Follow these
steps:

  1. Go
    to the How
    to Get Windows PowerShell 1.0 page.
  2. Download
    and install .NET Framework 2.0 if it’s not already installed on your system.
  3. After
    .NET Framework 2.0 is installed, download and install the Windows XP Service
    Pack 2 — Windows PowerShell 1.0 version that matches
    your platform (x86 or x64).

Once
Windows PowerShell is installed, go to the Scripting with
Windows PowerShell page and take a look at the
resources in the Getting Started section. If you want to see sample Windows PowerShell
scripts, check out the Script
Center Script Repository.

Note: This tip is for
Windows XP Professional only.

Miss a tip?

Check out the Windows XP archive, and catch up on our most recent Windows XP tips.

Stay on top of the latest XP tips and tricks with our free Windows XP newsletter, delivered each Thursday. Automatically sign up today!

  • Microsoft

Понравилась статья? Поделить с друзьями:
  • Windows phone как вернуться к заводским настройкам
  • Windows phone для mac скачать бесплатно
  • Windows phone для htc desire hd
  • Windows powershell грузит диск windows 10
  • Windows phone вход в учетную запись