To use the provided powershell scripts, you'll need to do a few things.

1. Open a powershell window running under an account (preferably an Admin) with remote powershell permissions.

2. Enable execution policy so the Sumo-Remote-Collector-Config.ps1 script is runnable.

    a) If the current execution policy is restricted, then powershell scripts are not runnable.

        Get-ExecutionPolicy

    b) Configure appropriate execution policy to run powershell scripts.

    	Set-ExecutionPolicy unrestricted

        If running the script prompts a warning (Security Warning Run only scripts that you trust...), the following may be appropriate.

        Set-ExecutionPolicy bypass

3. Create a credential objects for opening a remote powershell session on the remote machine.
   The credentials are encrypted as a secure string and only needed for authentication by the powershell scripts.

   The following command prompts for credentials.

	(1) $ps_cred = get-credential

4. Run the Sumo-Remote-Collector-Config.ps1 script to check and configure the remote machines for remote collection.

	a) To *check* if configuration is needed, include the "-check" parameter.

	./Sumo-Remote-Collector-Config.ps1 -computernames [[COMPUTENAME1, COMPUTERNAME2, ETC]] -credential $ps_cred -check
	
	b) To *apply* required configuration changes, include the "-apply" parameter.

	./Sumo-Remote-Collector-Config.ps1 -computernames [[COMPUTERNAME1, COMPUTERNAME2, ETC]] -credential $ps_cred -apply

	If you want to *only* run the powershell script locally without remote powershell, then specify a single "localhost"
	as the computer name.  This will run in a local powershell session without going over the network.

ADDITIONAL INFORMATION:

1. The instructions above assume the remote machines are on the same network and have been enabled for remote powershell access (via WSMan or WinRM).

If this is not the case, there are instructions available from Microsoft on how to do this: http://technet.microsoft.com/en-us/library/hh847850.aspx
and you should consult your system administrator for assistance.

The following instructions are commonly required to enable remote powershell on the client machine, note this information is provided "as-is" and you
should consult your administrator for assistance before executing the following instructions.

On the client machine:

    PS C:\PSScripts> cd WSMan:\localhost\Client
    PS WSMan:\localhost\Client> dir

        WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Client

    Type            Name                           SourceOfValue   Value
    ----            ----                           -------------   -----
    System.String   NetworkDelayms                                 5000
    System.String   URLPrefix                                      wsman
    System.String   AllowUnencrypted                               false
    Container       Auth
    Container       DefaultPorts
    System.String   TrustedHosts

    PS WSMan:\localhost\Client> set-item .\AllowUnencrypted $true
    PS WSMan:\localhost\Client> set-item .\TrustedHosts *
    PS WSMan:\localhost\Client> Restart-Service WinRm
    PS WSMan:\localhost\Client> cd c:\psscripts

On the remote machine:

    enable-psremoting
    winrm quickconfig

Ensure the required ports are not blocked by the firewall.

    winrm get winrm/config/Client/DefaultPorts

2. If the scripts do not appear to work correctly, then run the powershell script including the "-info" parameter.

    ./Sumo-Remote-Collector-Config.ps1 -computernames cn1,cn2,etc -credential $ps_cred -info

And send all logs\psscript*.log files to Sumo Support with a description of the error.

    https://support.sumologic.com/requests/new

