To use the provided Powershell scripts, follow the steps below. Additional details can be obtained by running `Get-Help .\Sumo-Remote-Collector-Config.ps1 -full` from a Powershell console.

1. Open a powershell console running under an account with Powershell remoting permissions, and the ability to run scripts:

    > powershell.exe -executionpolicy bypass

2. Create required credentials objects:

    # Administrator login - used to connect to remote machines, and optionally to make configuration changes
    PS> $adminCred = Get-Credential
    
    # Event collection login - this should match the credentials you specify in Sumo Logic to be used for event collection
    # This does not need to be an Administrator account.
    PS> $eventCred = Get-Credential

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

    # To check firewall and local group configuration on a set of remote computers (default)
    
    PS> .\Sumo-Remote-Collector-Config.ps1 -computername [[COMPUTENAME1, COMPUTERNAME2, ETC]] -EventCollectionCredential $eventCred -AdminCredential $adminCred
    # or specify computer names in a text file, 1 per line
    PS> .\Sumo-Remote-Collector-Config.ps1 -File .\machines.txt -EventCollectionCredential $eventCred -AdminCredential $adminCred
    
    # To update firewall and local group configuration on a set of remote computers, add -DoUpdate flag
    
    PS> .\Sumo-Remote-Collector-Config.ps1 -computername [[COMPUTENAME1, COMPUTERNAME2, ETC]] -EventCollectionCredential $eventCred -AdminCredential $adminCred -DoUpdate
    # or specify computer names in a text file, 1 per line
    PS> .\Sumo-Remote-Collector-Config.ps1 -File .\machines.txt -EventCollectionCredential $eventCred -AdminCredential $adminCred -DoUpdate

    # if no computer names are specified, configuration will be checked or updated on the local machine

ADDITIONAL INFORMATION:

1. The instructions above assume the remote machines are accessible and have Windows Powershell Remoting enabled.

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:\> 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:\

On the remote machine:

    PS> Enable-PSRemoting
    PS> 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
