| Cmdlet | CLI equivalent | What it does |
|---|---|---|
Get-Customer |
customer list, get, search |
Lists customers (filter by group, time, or the server-side filters below; -All reads every customer), gets one by -Number, or searches with -Search. |
New-Customer |
customer create |
Creates a customer from field parameters, a hashtable, or a JSON file. |
Update-Customer |
customer update |
Sparse update of a customer. |
Remove-Customer |
customer delete |
Deletes a customer (-Purge asks DK Plus to purge it permanently where supported). Confirmation: High. |
Get-CustomerTransaction |
customer transaction list, list-for, page |
Lists transactions (-All without -Customer pages through all of them), reads one filtered page, or reads every transaction of a customer with -Customer -All. |
Get-CustomerContact |
customer contact list, get |
Lists a customer's contacts or gets one. |
New-CustomerContact |
customer contact create |
Adds a contact. |
Update-CustomerContact |
customer contact update |
Sparse update of a contact. |
Remove-CustomerContact |
customer contact delete |
Deletes a contact. Confirmation: High. |
Get-CustomerReceiver |
customer receiver list, get |
Lists a customer's item receivers or gets one. |
New-CustomerReceiver |
customer receiver create |
Adds an item receiver. |
Update-CustomerReceiver |
customer receiver update |
Sparse update of an item receiver. |
Remove-CustomerReceiver |
customer receiver delete |
Deletes an item receiver. Confirmation: High. |
Get-CustomerGroup |
customer group list |
Lists customer groups (-All reads every group). |
New- and Update- cmdlets are Medium impact: they run without a prompt unless you pass -Confirm, and -WhatIf shows the target without sending a request. The Get- cmdlets never prompt, except their -All parameter set, which asks before it reads every record (see Read customers).
Get-Customer lists up to 100 customers by default and streams them page by page, so stopping early sends fewer requests. -Take N changes the limit (1 to 1000; 0.4.2 allowed up to 10,000, so use -All to read more), and -All returns every customer.
# Customers of a group changed in the last week
Get-Customer -Group 01 -ModifiedSince (Get-Date).AddDays(-7)
# One customer, with its contact details
Get-Customer -Number 10001 | Format-List Number, Name, Email, Phone, Balance
# Text search
Get-Customer -Search 'Acme' -Maximum 10
# Export every customer to CSV, 500 per request (asks first; -Confirm:$false skips the question)
Get-Customer -All -PageSize 500 -Confirm:$false | Export-Csv customers.csv -NoTypeInformation
-All confirms first. Reading every record can move a lot of data, so the All parameter set confirms like a High-impact cmdlet: pass -Confirm:$false (or set $ConfirmPreference = 'None') in scripts, a host that cannot prompt fails before any request without it, and -All -WhatIf shows the target and sends nothing. -All cannot be combined with -Take, and -All:$false behaves as if -All were omitted (no prompt, the first 100). -WhatIf and -Confirm have no effect on the other parameter sets.
Choose the properties. -Include and -Exclude select the properties DK Plus returns, by public property name (Tab completes them). The request always carries the identity.
Get-Customer -Include Number, Name, Email -Take 500
Get-Customer -All -Exclude Contacts -Confirm:$false
Server-side filters. Get-Customer has -Name, -SalesPerson, -Country, -PostalCode, -PaymentTerm, -PaymentMode, -Email, -Blocked, -VatExempt, and -Deleted. DK Plus applies them; the module never filters records itself. DK Plus matches the customer group, name, and email only in lowercase, so the client sends the text filters lowercase and -Country uppercase. -Name 'Jón' is a contains search (*jón*); with * the value is a wildcard pattern, and a value of several words matches nothing. A text filter is sent only when you give it, and a switch is sent only when you pass it (-Blocked:$false sends false). Live (2026-10-13), letter country codes such as IS match no customers while numeric codes do. What -Blocked:$false means is not verified live.
Get-Customer -SalesPerson S-7 -Name 'Jón' -Blocked:$false
A customer number that does not exist writes a non-terminating ObjectNotFound error, so a piped list keeps going. -ErrorAction SilentlyContinue turns the call into an existence check.
Every customer object already contains its settings, contacts, receivers, memos, properties, change history, and attachments. The CLI's --expand has no counterpart:
(Get-Customer -Number 10001).Contacts
# From fields
New-Customer -Number 10001 -Name 'Acme hf.' -Group 01 -Address1 'Laugavegur 1' -City Reykjavik -PostalCode 101 -CountryCode IS
# With more members from a hashtable
New-Customer -InputObject @{
Number = '10002'
Name = 'Example ehf.'
Email = '[email protected]'
PaymentTerm = '30'
Credit = @{ CreditLimit = 500000 }
}
# From a JSON file, previewed first
New-Customer -Path ./customer.json -WhatIf
An update sends only the members you give. '' clears a text field; omitting a parameter, or passing $null, leaves it unchanged.
# Change the email and clear the alias
Update-Customer 10001 -Email '[email protected]' -Alias ''
# Block every customer of a group; remove -WhatIf to send
Get-Customer -Group 99 -Take 1000 | Update-Customer -Blocked -WhatIf
# Nested sections need a hashtable
Update-Customer 10001 -InputObject @{ Credit = @{ CreditLimit = 500000 } }
# From a JSON file
Update-Customer 10001 -Path ./customer-update.json
-Blocked:$false unblocks. An update that sets nothing, such as -InputObject @{}, fails before any request. See Pipelines and updates.
Contacts and receivers are managed with their own cmdlets. The customer comes first, then the contact or receiver number.
Get-CustomerContact 10001
Get-CustomerContact 10001 1 | Format-List
New-CustomerContact -Customer 10001 -Number 1 -Name 'Accounts payable' -Email [email protected] -MobilePhone 5551234
# Clear the title of every contact of a customer
Get-CustomerContact 10001 | Update-CustomerContact -Title ''
New-CustomerReceiver 10001 @{
Number = 'R2'
Name = 'Store 2'
Address = @{ Lines = @('Skeifan 2'); PostalCode = '108'; CountryCode = 'IS' }
}
# Delete the contacts without an email address (no prompt in a script)
Get-CustomerContact 10001 | Where-Object { -not $_.Email } | Remove-CustomerContact -Confirm:$false
Contact and receiver objects carry a Customer property (and Contact or Receiver), so piping them into the matching Update- or Remove- cmdlet binds both identities. A contact piped into a receiver cmdlet is rejected.
Get-CustomerTransaction -Customer 10001 -ModifiedSince '2026-10-01'
# One filtered page
Get-CustomerTransaction -Page 1 -Count 200 -DueAfter (Get-Date -Day 1).Date
# Every transaction of one customer, summed (asks first, like every -All)
Get-CustomerTransaction -Customer 10001 -All | Measure-Object Amount -Sum
Get-CustomerTransaction -Customer X -All keeps reading the customer's own list and fails with DkPlus.InvalidArgument when combined with -ModifiedSince, -PageSize, -Include, or -Exclude. Without -Customer, -All pages through all transactions.
Breaking change: in 0.4.2, -Include and -Exclude without a page-only parameter (-Page, -Count, -DueAfter, -Voucher, -Sort, ...) selected the Page set and took DK Plus wire field names. They now select the list set and take public property names, so a call such as -Exclude ID that worked in 0.4.2 now fails. Add -Page to keep using wire field names. Also, parameter abbreviations that were unique in 0.4.2 are ambiguous on Get-Customer now (-N, -S, -Pa); spell the parameter name out.