Public/New-LprMatchListEntry.ps1
function New-LprMatchListEntry { <# .SYNOPSIS Creates a new LPR Match List Entry to later be added to a Milestone XProtect VMS using Add-LprMatchListEntry .DESCRIPTION The command to add an entry to an LPR Match List entry can be difficult to format properly when adding multiple entries, or adding entries with one or more custom fields. This function takes a registration number and a set of keys and values via the CustomFields [hashtable] parameter and the Add-LprMatchListEntry function takes one or more of these [LprMatchListEntry] objects and ensures the data is added to the match list without you having to know the proper order or formatting to send the parameters in. .EXAMPLE PS C:\> $entry = New-LprMatchListEntry -RegistrationNumber ABC123 -CustomFields @{ EmployeeId = '123456' } PS C:\> Add-LprMatchListEntry -Name Staff -LprMatchListEntry $entry Creates an [LprMatchListEntry] object and stores it in the $entry variable, then adds the data to the LPR Match List named 'Staff'. #> [CmdletBinding()] [OutputType([LprMatchListEntry])] param( # Specifies the registration number [Parameter(Mandatory)] [string] $RegistrationNumber, # Specifies an optional collection of custom field names and values [Parameter()] [hashtable] $CustomFields = @{} ) process { [LprMatchListEntry]@{ RegistrationNumber = $RegistrationNumber CustomFields = $CustomFields } } } |