The below commands shold be executed with elevated privelges
-
Remote Computer should have static ip and porper name set
-
To see the ip address
- Get-NetIpAddress
- Get-NetIPConfiguration
-
To create a new ip
- New-NetIpAddress
-
To set the DNS Server
- Set-DNSClientServerAddress
-
To rename a computer
- Rename-Computer
-
To restart the computer
- Restart the computer
-
-
Firewall Fire & Printer Service group should enabled
-
To check the firewall rule
- Get-NetFirewallRule
-
To enable the firewall rule
- Enable-NetFirewallRule
- Set-NetFirewallRule
-
-
Network catogory should be domain or private
-
To check the network category
- Get-NetConnectionProfile
-
To change the network category
- Set-NetConnectionProfile
-
-
Enable the ps remoting
- To enable the ps remoting
- Enable-PSRemoting -Force
- To enable the ps remoting
-
Remote computername / ip to WSMAN trusted list
-
To see the WSMan trusted list
- Get-Item -Path WSMan:\localhost\Client\TrustedHosts
-
To set the WSMan trusted hosts
- Set-Item -Path WSMan:\localhost\Client\TrustedHosts -Value <computername/ip>
-
-
Test the connectivity
- To check the remote connection Test-WSMan
-
Create credentials
- To create ctedentials
- Get-Credential
- To create ctedentials