Using PowerShell to Deploy the Deployment Agent to an Endpoint

Version 2

    Verified Product Versions

    AppSense Management Center 8.7

    Introduction

    Its possible to use PowerShell to Deploy the Deployment Agent to an Endpoint using the API.

    Detail

    There are a couple of prerequisites to the script.

    1) The machines need to be discovered within the management centre database

    2) You will need to be able to have access to the SQL database as we need to gather GUIDs for the machine and the group you wish the machine.

    To Find the Group GUID the following SQL quresy can be used

    SELECT [GroupPK]
    FROM [ManagementServer].[dbo].[Groups]
    Where Name = 'Group'

    NOTE: You will need to replace the Group with the name of the group you wish the machine to register to.

    To Find the Machine GUID the following SQL query can be used

    SELECT [DiscoveredMachinePK]
    FROM [ManagementServerMaster].[dbo].[DiscoveredMachines]
    WHERE NetBiosName = 'Manchine'

    NOTE: You will need to enter the NetBios name of the endpoint that has been discovered.

    Once you have the above information, you will need to edit the following links in the script

    $url = 'http://AMC:80/ManagementServer' -- this needs to be name of your Management Server
    $dll = 'C:\Program Files\AppSense\Management Center\Console\ManagementConsole.WebServices.dll' -- Location of the dll if not in the same folder.
    $discoveredMachineKey = [Guid]'32834F51-56BE-4BB5-BCAB-1D168D5B0484' - The GUID is pulled from the discovered Machines table within your database 
    $groupKey = [Guid]'9909FF95-B296-4A73-9BA1-DF84B521DC67' -- The GUID is pulled from the groups table within your database

     

    Attachment

    See Attachment : Script.zip (below)