WinRM — remote work with PowerShell

so released Windows Management Framework for all OS, even for XP.

For me there is, besides, PowerShell 2.0, WinRM basic. In the Annex to PowerShell is just a way to execute commands on a remote computer.

Here's how to do it:
0. Put the Windows Management Framework Core

1. To configure winrm on the machine which is the server:
1.1 log in cmd.exe (I tried to do it from under the ISE, but it does not work with an interactive console programs)
1.2 run winrm qc
1.3 to answer Y to the question about changes

2. Now in PowerShell ISE on the client machine click the icon of the terminal, to type the name of the server and account, then enter password and work with the usual ISE on a remote machine.

And even with the help of a set of commands *-PSSession able to finish this scenario. Go to the remote machine to execute long-running operation to return report user it's done.



PS Boomburum sent a message from anonymous:

"Hello! You, as the method has not found solutions ;)). In General, the problem is this — do not know how to contact the author of one of the topics. (specifically — habrahabr.ru/post/73613/). This article has pushed me to acquaintance with the network capabilities of powershell. When you configure this feature on a PC with Windows XP SP3 there is a problem — popped up the error follows:
**********************************************************************
PS C:\Documents and Settings\Administrator > winrm qc
WinRM is not set up to receive requests on this machine.
The following changes must be made:

Start the WinRM service.

Make these changes [y/n]? y

WinRM has been updated to receive requests.

WinRM service started.
WSManFault
Message = Access is denied.

Error number: -2147024891 0x80070005
Access is denied.
PS C:\Documents and Settings\Administrator>
**********************************************************************
I am a long time looking for solutions to this problem online, but no — nothing good could not find. In General,
To solve this problem, you should go to start->administrative tools ->Local security policy ( Local Security Settings — secpol.msc) -> security Settings (Security option) -> Find "Network access: model sharing and security for local accounts" (Network Access: Sharing and security model for local accounts) -> change the policy to "Classic -..." (Classic...) -> Reboot and all — the problem of the end!

Please send this message to the author of this topic, because I can't do it alone. He is placed, because the Russian speaking population of the Internet, this greatly simplifies the search for a solution to this problem. The problem is quite widespread! But I have seen only on Windows XP. (All tested on a virtual machine with a clean system). Huge thanks in advance!"
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

Address FIAS in the PostgreSQL environment. Part 4. EPILOGUE

PostgreSQL: Analytics for DBA

Audit Active Directory tools with Powershell releases. Part 1