This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Powershell script for Orion.AgentManagement.Agent

Hi Team,

I have to uninstall plugin from agents installed on multiple servers.

We can manually uninstall it from SWQL studio.

Can someone provide a powershell script to uninstall the agent plugin from multiple servers. 

prashantsingh_0-1593730740936.png

Thanks

Prashant

  • Something like below should get you started. I haven't been able to test it yet, but it should at least get you pointed in the right direction.

    import-module SwisPowershell
    
    $swis = Connect-Swis -Host localhost -Certificate
    
    $agents = #Define Agents either via a query or a CSV of some sort
    $plugin = #define Plugin
    
    foreach($agent in $agents){
    Invoke-SwisVerb $swis Orion.AgentManagement.Agent UninstallPlugin @($agent, $plugin)
    sleep -m 200
    }
    Write-Output "Script Complete. Exiting..."