PowerShell Remote Management Server & Client (non-MSTSC remote connection)

Source: Internet
Author: User
Tags mstsc

PowerShell Remote Management employs a new communication protocol, Web Services for Management, referred to as Ws-man it works over HTTP or HTTPS, and the implementation of Ws-wan is primarily based on a background service: Windows Remote Management (WinRM). The service is turned on by default in Server2008r2, and the service is integrated in the system by default on Server2012, Win7 installed by default, but disabled by default, Win8,win10 is turned on by default. This remote connection is not detected by the client and does not take up the number of remote connections!

We need two computers to test, and both computers need to be in the same domain (if not in the domain, you need to add a trusted host, and enter the credentials of the other computer, and later show how to remote non-domain computers)

If you want a one-to-many remote, but such a computer is very cumbersome to enable, you can try to use Group Policy issued!


= = = Computer remote management in the domain

1. Administrator privileges to run PowerShell, enter enable-psremoting to open PowerShell remote management, remote and remote end need to be enabled, also explained that WinRM is the PowerShell remote management using port HTTP, 5985;https,5986

You can also modify the default port number, but you need to make a port number to connect each time you do a remote operation

650) this.width=650; "title=" QQ picture 20160714164448.png "alt=" wkiom1ehuucs7bn4aafp054ozrm347.png "src="/http S1.51cto.com/wyfs02/m00/84/2b/wkiom1ehuucs7bn4aafp054ozrm347.png "/>


2.s12-1powershell Remote Management s12-2, it's so easy, but if it's not a computer in a domain, it's not that simple.

You can see that the shell command format becomes [s12-2]:P s ..., which indicates that the link has been successfully established

Now all the statements executed are run on the s12-2, you can enter any command, you need to note that you need to know the other side of the computer name, because WinRM by default does not allow the use of IP addresses or aliases in DNS for remote processing.

The process is implemented by Kerberos and does not pass the user name and password to the remote computer over the network. Any commands you perform on a remote computer depend on your credentials, so you can do anything within the scope of the permission (with the domain administrator)

650) this.width=650; "title=" QQ picture 20160714164448.png "alt=" wkiol1ehuq-io-s7aaazyasy--w629.png "src="/http S5.51cto.com/wyfs02/m01/84/2b/wkiol1ehuq-io-s7aaazyasy--w629.png "/>


3. What commands do I need to exit after executing a command on a remote computer ? Enter-pssession is the remote operation of the computer, then of course you can use exit-pssession, if you guessed it, give yourself a small red flower! In fact, you can also use ESXi to exit directly

650) this.width=650; "title=" QQ picture 20160714164448.png "alt=" wkiom1ehvkzho6kjaaaou7axkfo319.png "src="/http S3.51cto.com/wyfs02/m00/84/2c/wkiom1ehvkzho6kjaaaou7axkfo319.png "/>


= = = Non-domain computer remote management

1. Enter enable-psremoting to open PowerShell remote management, both remote and remote ports need to be enabled

650) this.width=650; "title=" QQ picture 20160714164448.png "alt=" wkiol1ehxm-swza5aaf41kwbjyu639.png "src="/http S2.51cto.com/wyfs02/m02/84/2b/wkiol1ehxm-swza5aaf41kwbjyu639.png "/>

2. The error message clearly indicates that the client is not joined to the domain, it is certainly not possible to use Kerbose authentication, naturally need to manually enter the target credentials, and then look down, if you want to remote, you need to configure a trusted host

650) this.width=650; "title=" QQ picture 20160714164448.png "alt=" wkiol1ehxyrqj5reaace4183xya049.png "src="/http S3.51cto.com/wyfs02/m01/84/2c/wkiol1ehxyrqj5reaace4183xya049.png "/>


3. Configure a trusted host, value specifies the computer to be remote

650) this.width=650; "title=" QQ picture 20160714164448.png "alt=" wkiol1ehxmbyfq_jaab0yfr0fqo848.png "src="/http S2.51cto.com/wyfs02/m00/84/2c/wkiol1ehxmbyfq_jaab0yfr0fqo848.png "/>


4. Create a new session, enter the other's account password as the credentials of the remote target computer

650) this.width=650; "title=" QQ picture 20160714164448.png "alt=" wkiol1ehxybhf9elaaciousnrmi186.png "src="/http S1.51cto.com/wyfs02/m02/84/2c/wkiol1ehxybhf9elaaciousnrmi186.png "/>


5. When there is no domain, computername must be specified as an IP address, and then specify your credentials to be remote to the destination computer, which is a very remote way of not adding a domain.

650) this.width=650; "title=" QQ picture 20160714164448.png "alt=" wkiom1ehyaayzgs3aaa5xlhvqo4232.png "src="/http S4.51cto.com/wyfs02/m00/84/2c/wkiom1ehyaayzgs3aaa5xlhvqo4232.png "/>


= = = Client operating system Open PowerShell remote management times wrong resolution

1. The server does not have this problem, the client because the network connection type is set to public, public mode is unable to turn on PowerShell remote management, you need to set the network connection type to domain or private

650) this.width=650; "title=" QQ picture 20160714164448.png "alt=" wkiol1ehya-wwtx5aabz50m1xy8843.png "src="/http S2.51cto.com/wyfs02/m01/84/2c/wkiol1ehya-wwtx5aabz50m1xy8843.png "/>

2.win7 settings are very simple, here is not a demonstration, Win10 and Win8 change method basically consistent, here to WIN10 as a demonstration

1) Click Set 650) this.width=650; "title=" QQ picture 20160714164448.png "alt=" wkiol1ehyufbt5lhaajcaswxkgm108.png "src="/http S1.51cto.com/wyfs02/m00/84/2c/wkiol1ehyufbt5lhaajcaswxkgm108.png "/>

2) Select Network and Internet

650) this.width=650; "title=" QQ picture 20160714164448.png "alt=" wkiom1ehyx_iwcdfaabushrlvb8732.png "src="/http S4.51cto.com/wyfs02/m01/84/2c/wkiom1ehyx_iwcdfaabushrlvb8732.png "/>3) Select Ethernet, then click Network Connection, if it is wireless select WLAN

650) this.width=650; "title=" QQ picture 20160714164448.png "alt=" wkiom1ehy22wluxyaabuuw4px_e907.png "src="/http S5.51cto.com/wyfs02/m02/84/2c/wkiom1ehy22wluxyaabuuw4px_e907.png "/>4. If you turn it on and your computer is in a domain environment, your network connection is a domain network. If the workgroup environment is a private network, if it is turned off, the system will determine that the network environment is a public network and will not be able to open PowerShell remote management

650) this.width=650; "title=" QQ picture 20160714164448.png "alt=" wkiom1ehy8vdijzraab4akcaxze614.png "src="/http S4.51cto.com/wyfs02/m02/84/2c/wkiom1ehy8vdijzraab4akcaxze614.png "/>5. After the client changes the network connection environment, enable PowerShell remote management again to enable success!

650) this.width=650; "title=" QQ picture 20160714164448.png "alt=" wkiol1ehzfesgybbaacmg_-e6uu274.png "src="/http S4.51cto.com/wyfs02/m01/84/2c/wkiol1ehzfesgybbaacmg_-e6uu274.png "/>

Take the time to try the effects of PowerShell remote management!

This article from "Sameold" blog, declined reprint!

PowerShell Remote Management Server & Client (non-MSTSC remote connection)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.