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 "width=" 650 "/>
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 "width=" 650 "/>
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 "width=" 650 "/>
= = = 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 "width=" 650 "/>
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 "width=" 650 "/>
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 "width=" 650 "/>
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 "width=" 650 "/>
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 "width=" 650 "/>
= = = 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 "width=" 650 "/>
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 "width=" 650 "/>
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 "width=" 650 "/>3) select Ethernet, then tap network connection, If it's wireless, choose Wi-Fi.
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 "width=" 650 "/>4. If you turn it on, the computer is in a domain environment, Then your network connection is a domain network, if you are in a workgroup environment is a private network, if you shut it down, the system will determine that the network environment is a public network, you 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 "width=" 650 "/>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 "width=" 650 "/>
Take the time to try the effects of PowerShell remote management!
This article from the "Erick" blog, declined to reprint!
Power Shell Remote Connection