homotechsual / HaloAPI

PowerShell module for the Halo Service Solutions series of software products.
MIT License
48 stars 38 forks source link

How to: #20

Closed DirectITServicesUK closed 1 year ago

DirectITServicesUK commented 1 year ago

Not really an issue, but how do you use some of these? For EG, New-HaloAgentBatch

homotechsual commented 1 year ago

Better documentation is coming - no fixed timeline but it's in progress!

The *-*Batch commandlets just run their standard commandlet in parallel.

e.g. New-HaloAgentBatch is just New-HaloAgent with parallel processing support to handle massive requests easier.

Both take a single parameter -Agents which is an array of agent objects.

$Agents = @(
  @{
    Name = 'Patricia Jones'
    FirstName = 'Patricia'
    Surname = 'Jones'
    Teams = @(@{ team_name = '2nd Line Support' })
    Departments = @( @{ department_id = 3 })
    Email = 'patricia@test.example'
    JobTitle = 'Senior Support Engineer'
  },
  @{
    Name = 'Mary Johnson'
    FirstName = 'Mary'
    Surname = 'Johnson'
    Teams = @(@{ team_name = 'Project Managers' })
    Departments = @( @{ department_id = 9 })
    Email = 'mary@test.example'
    JobTitle = 'Project Manager'
  },
)
New-HaloAgent -Agents $Agents
DirectITServicesUK commented 1 year ago

Ahhhh. I see. Thanks for that