Skip to content

Instantly share code, notes, and snippets.

@kpatnayakuni
Created May 2, 2020 13:55
Show Gist options
  • Save kpatnayakuni/a433a3548af2f920444103461f1a9097 to your computer and use it in GitHub Desktop.
Save kpatnayakuni/a433a3548af2f920444103461f1a9097 to your computer and use it in GitHub Desktop.

On Remote Server

The below commands shold be executed with elevated privelges

  1. 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
  2. Firewall Fire & Printer Service group should enabled

    • To check the firewall rule

      • Get-NetFirewallRule
    • To enable the firewall rule

      • Enable-NetFirewallRule
      • Set-NetFirewallRule
  3. Network catogory should be domain or private

    • To check the network category

      • Get-NetConnectionProfile
    • To change the network category

      • Set-NetConnectionProfile
  4. Enable the ps remoting

    • To enable the ps remoting
      • Enable-PSRemoting -Force

On the base computer

  1. 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>
  2. Test the connectivity

    • To check the remote connection Test-WSMan
  3. Create credentials

    • To create ctedentials
      • Get-Credential
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment