2 Replies Latest reply on Sep 8, 2017 3:08 PM by gregb

    Change computer group via Powershell?

    gregb

      I've been messing around with the EPOwershell module and it seems like a great tool that really should get some professional Mcafee attention.

       

      Anyway I'm trying to build a tool which automates a good portion of new machines that get put out to new users.  If there were a way to automatically move machines to different groups I can completely avoid getting into the EPO console.  Now I'm not the "EPO guy" but I have enough access to at least get my powershell script to work as it currently is.  There has to be a way to move computers to specific groups automatically via a script.  I don't want something that applies to all machines, I need to be able to target specific machines and move them if needed.

       

      Thanks guys!

        • 1. Re: Change computer group via Powershell?
          tkinkead

          Not sure the EPOwershell module supports a function to do that, but you can use the system.move call in the ePO Web API.

           

          system.move names parentGroupId [autoSort] - Moves systems to the specified destination group.

           

          Check the API guide if you need more help.  I think "names" takes a comma-separated list

           

          https://kc.mcafee.com/resources/sites/MCAFEE/content/live/PRODUCT_DOCUMENTATION/ 24000/PD24810/en_US/epo_510_rg_Web%20API…

           

          If you've got specific questions, feel free to post some code and we can take a look.

          • 2. Re: Change computer group via Powershell?
            gregb

            Thanks for the response!

             

            Is it possible to use the invoke-webrequest in powershell to do the same thing?  If so what would the syntax be when trying to move a machine from the default group to "My Organization\Z-Disabled Devices\Workstations\Encrypted\Preboot DISABLED"?

             

            The EPOwershell module makes things very simple:

             

            function encryptComp {

                #The commented out code does not move to the desired group.

                #Get-EpoGroup -GroupPath "My Organization\Z-Disabled Devices\Workstations\Encrypted\Preboot DISABLED" | Get-EpoSystem

                get-eposystem "$destComp" | Add-EpoTag -tagname "EE:ALDU - Endpoint Encryption Add Location Domain Use" , "Deploy-MDE"

                get-eposystem "$destComp" | Send-EpoAgentWakeupCall

            }