2 Replies Latest reply on Jan 11, 2017 4:18 PM by gregf

    Appsense command let for powershell


      Do we have appsense command let whoch can used to manage appsense management center or query information from management center etc...

        • 1. Re: Appsense command let for powershell
          Landon Winburn ITSMMVPGroup

          In the guides folder of the suite installer you'll find the AppSense Management Center Web Services API Guide. This contains powershell examples to connect up and pull information like you would like to do.

          • 2. Re: Appsense command let for powershell

            99% of what you can do in the Management Console can be scripted - pulling out information, moving machines between groups, unlocking packages, changing poll times etc.


            The web services API guide isn't particularly friendly. If you really want to get stuck in, fire up the PowerShell ISE, create a connection to the relevant Web Service (Machines, Groups etc.) and use Intellisense to look for the function you need. Or fire up Fiddler and monitor the web service requests being made by managementconsole.exe as you do whatever it is you need to script. You'll see the web service being used, the function being called, and the parameters being passed.


            Or - if there's something specific you want to do, post a question here and you'll probably get a script to help do it.


            Here's a quick and dirty example to extract details for machines in a given deployment group:


            $amcServerUrl = 'https://amc01/'

            $groupName = 'CIO-Corp - Audit'


            $groupsProxy = New-WebServiceProxy -Uri $amcServerUrl/ManagementServer/DataAccess/Groups.asmx -UseDefaultCredential

            $machinesProxy = New-WebServiceProxy -Uri $amcServerUrl/ManagementServer/DataAccess/Machines.asmx -UseDefaultCredential


            $groups = $groupsProxy.GetDeploymentGroupsLight()


            $machinesProxy.GetFromGroupKey(($groups.Groups | Where-Object {$_.Name -eq $groupName}).GroupKey, $false).Machines | ogv