PoshCode Archive  Artifact [f75f130988]

Artifact f75f1309888b4b205a4e554c0ea25fac230593776d7fbf3033a396f67f5edf71:

  • File Enable-PS-Remoting.ps1 — part of check-in [1cae681a56] at 2018-06-10 13:40:14 on branch trunk — Enable Powershell Remoting allowing access for all trusted hosts (user: St3v3o size: 585)

# encoding: ascii
# api: powershell
# title: Enable PS Remoting
# description: Enable Powershell Remoting allowing access for all trusted hosts
# version: 0.1
# author: St3v3o
# license: CC0
# x-poshcode-id: 4382
# x-archived: 2016-02-14T09:48:39
# x-published: 2016-08-12T02:01:00
#
#
#Run winrm quickconfig defaults
echo Y | winrm quickconfig

#Run enable psremoting command with defaults
enable-psremoting -force

#Enabled Trusted Hosts for Universial Access
cd wsman:
cd localhost\client
Set-Item TrustedHosts * -force
restart-Service winrm
echo "Complete"