Version 4

    I'm writing a PowerShell module in C# that uses the ePO Web API. It is far from finished and might contain bugs, so try it in your test environment first! I've tested the module on a Windows 2008 R2 server. The module does not contain a help file (working on it) and only a partial Format file.


    Let me know if you find an issue and include a screenshot of the command (use the -Verbose parameter).


    Available commands:

    • Add-EpoTag
    • Clear-EpoTag
    • Connect-EpoServer
    • Get-EpoClientTask
    • Get-EpoGroup
    • Get-EpoQuery
    • Get-EpoServerTask
    • Get-EpoServerTaskLogMessage
    • Get-EpoServerTaskSubTask
    • Get-EpoSystem
    • Get-EpoTag
    • Invoke-EpoClientTask
    • Invoke-EpoQuery
    • Send-EpoAgentWakeupCall
    • Set-EpoUserProperties
    • Start-EpoServerTask
    • Stop-EpoServerTask


    How to start:

    1. Extract the zip file to "C:\Windows\System32\WindowsPowerShell\v1.0\Modules"
    2. Start Powershell
    3. Run "Import-Module ePOwerShell"


    Here some examples of how you can use the ePOwerShell module:


    Connecting to Epo server:


    Program will try to read the ePO server from the McAfee Agent registry settings and connecto to it on port 8443


    Connect-EpoServer -IgnoreSSL

    Use -IgnoreSSL if your ePO server uses a self-signed certificate


    Connect-EpoServer -Server epo.domain.local -Port 8443 -UserName "EpoUser" -Password "MyEpoPass"

    Connect to specific ePO server with specified credentials


    System related:

    Get-EpoSystem "MyComputer" | Add-EpoTag "MyTag1", "MyTag2"

    Get-EpoSystem "MyComputer" | Clear-EpoTag "MyTag3"

    Get-EpoSystem "MyComputer" | Send-EpoAgentWakeupCall -ForceFullPolicyUpdate

    Get-EpoSystem "MyComputer" | Set-EpoUserProperties -Description "This is My Computer" -CustomField4 "Custom property 4"

    Get-EpoClientTask "Update VirusScanner" | Invoke-ClientTask -ComputerName "MyComp1", "MyComp2"


    Group related:

    Get-EpoGroup -GroupPath "My Organization\Test Group\Sub Group" | Get-EpoSystem

    Get-EpoGroup "Test Group" | Get-EpoSystem -SearchSubgroups

    Get-EpoGroup "Test Group" | Send-EpoAgentWakeupCall -IncludeSubgroups -FullProperties


    Server task related:

    Get-EpoServerTask -History -TaskID 1234567 | Get-EpoServerTaskLogMessage

    Get-EpoServerTask -History -TaskID 7654321 | Get-EpoServerTaskSubTask

    Get-EpoServerTask -Running | ?{$_.taskName -match "Replicate Repository"} | Stop-EpoServerTask

    Get-EpoServerTask "AD Sync" | Start-EpoServerTask


    Query related:

    Get-EpoQuery | ?{$_.Name -eq "My ePO Query"} | Invoke-EpoQuery

    Get-EpoQuery | ?{$_.Name -eq "List of systems"} | Invoke-EpoQuery | Send-EpoAgentWakeupCall