[Original] enables remote PowerShell management and remote powershell management.
To enable remote PowerShell management for a non-Domain Network, run the following command:
The following operations, PS command window, must be executed in the administrator province.
Step 1: Enable PowerShell Remote Management Service for machine A and machine B.
A = 192.168.3.32
PS> Enable-PSRemoting
Select Y as prompted to enable remote management.
B = 192.168.3.37
PS> Enable-PSRemoting
Select Y as prompted to enable remote management.
Step 2: machine A and B trust the IP address or name of the machine to be remotely managed.
A = 192.168.3.32
PS> Set-Item WSMan: \ localhost \ Client \ TrustedHosts-Value 192.168.3.37
Select Y as prompted to allow remote command sending.
B = 192.168.3.37
PS> Set-Item WSMan: \ localhost \ Client \ TrustedHosts-Value 192.168.3.37
Select Y as prompted to allow remote command sending.
Step 3: remotely log on to and execute commands on machine A to machine B.
A = 192.168.3.32
PS> Enter-PSSession-ComputerName 192.168.3.37
As follows:
On Machine A, remotely execute command machine B to create the folder D: \ Test
View machine B, which has the folder D: \ Test created remotely.
In the future, I will demonstrate how to use PowerShell + Jenkins to remotely deploy four C #. NET programs:
1. Client update package, File System
2. WCF Service
3. Task Scheduler
4. MVC website
[Original]You are welcome to exchange and share the technology. For more information, please attach the following content:
If you think this article is helpful to you, please remember to give me a thumbs up. Thank you!
By kevin 【