< Back

Invoke-ePOCommand

Sat Jan 18, 2020 7:48 pm

NAME Invoke-ePOCommand



SYNOPSIS

Sends the command specified to the McAfee EPO server.





SYNTAX

Invoke-ePOCommand [-Command] <String> [[-Parameters] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Sends the command specified to the McAfee EPO server. Connect-ePoServer has to be run first,

as this function uses the epoServer script variable created by that functions connection to the server as well as

the

credentials script variable.

This function is the main piece of the entire POSH-ePoAPI module.





PARAMETERS

-Command <String>

The command to send to the McAfee EPO API.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Parameters <String[]>



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





Added support for -Whatif

Changed from System.Net.Webclient to using Invoke-RestMethod



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$CurrentPC = Invoke-ePOCommand -Command "system.find" -Parameters "searchText=$($env:computername)"



$CurrentPC.result.list.row



Returns the output of the system.find API command with a search paramter for the current computer.











RELATED LINKS