The CLI equivalents are described in the command reference; the library behavior behind them is in Sales documents.
The list cmdlets (Get-Invoice, Get-Order, Get-Quote, Get-RecurringSale, Get-SalesPerson) return 100 records by default. -Take N changes that (1 to 1000), and -All returns every record after a confirmation (pass -Confirm:$false in scripts). Get-Invoice, Get-Order, Get-Quote, and Get-RecurringSale also take -Include and -Exclude to choose the properties DK Plus returns; Get-SalesPerson does not.
Get-Order -Status OnHold -Take 500
Get-Invoice -Customer 10001 -All -Confirm:$false
Get-Quote -Include Id, Number, Customer -Take 50
| Cmdlet | CLI equivalent | What it does |
|---|---|---|
Get-Invoice |
sales invoice list, get |
Lists sales invoices (filter by customer or time) or gets one by -Number. |
Save-InvoicePdf |
sales invoice pdf |
Saves an invoice as a PDF file. |
Get-InvoiceHtml |
sales invoice html |
Returns the invoice as HTML text, or saves it with -Path. |
Send-InvoiceEmail |
sales invoice email |
Emails the invoice. Confirmation: High. |
New-Invoice |
sales invoice create |
Creates an invoice from a customer and lines, and posts it by default. Confirmation: Medium. |
Orders, quotes, and recurring sales are identified by a UUID (-Id). The Get- cmdlets also take -Number as a filter so you can find the UUID. New-Order, New-Quote, and New-RecurringSale create the document head only; each line is added afterwards with New-OrderLine, New-QuoteLine, or New-RecurringSaleLine.
| Cmdlet | CLI equivalent | What it does |
|---|---|---|
Get-Order |
sales order list, get |
Lists orders (filter by number, customer, status, or time) or gets one by -Id. |
New-Order |
sales order create |
Creates an order head (no lines). |
New-OrderLine |
sales order lines create |
Adds one line to an order. |
Update-Order |
sales order update |
Sparse update of an order head, or of lines through -InputObject. |
Update-OrderLine |
sales order lines update |
Sparse update of one order line. |
Remove-OrderLine |
sales order lines delete |
Deletes one order line. Confirmation: High. |
Remove-Order |
sales order delete |
Deletes an order (-Purge supported). Confirmation: High. |
Save-OrderPdf |
sales order pdf |
Saves an order as a PDF file. |
Get-OrderHtml |
sales order html |
Returns the order as HTML text, or saves it with -Path. |
Send-OrderEmail |
sales order email |
Emails the order. Confirmation: High. |
Get-Quote |
sales quote list, get |
Lists quotes or gets one by -Id. |
New-Quote |
sales quote create |
Creates a quote head (no lines). |
New-QuoteLine |
sales quote lines create |
Adds one line to a quote. |
Update-Quote |
sales quote update |
Sparse update of a quote. |
Update-QuoteLine |
sales quote lines update |
Sparse update of one quote line. |
Remove-QuoteLine |
sales quote lines delete |
Deletes one quote line. Confirmation: High. |
Remove-Quote |
sales quote delete |
Deletes a quote. Confirmation: High. |
Save-QuotePdf |
sales quote pdf |
Saves a quote as a PDF file. |
Get-QuoteHtml |
sales quote html |
Returns the quote as HTML text, or saves it with -Path. |
Send-QuoteEmail |
sales quote email |
Emails the quote. Confirmation: High. |
Get-RecurringSale |
sales recurring list, get |
Lists recurring sales (filter by number, customer, or group) or gets one by -Id. |
New-RecurringSale |
sales recurring create |
Creates a recurring-sale head (no lines). |
New-RecurringSaleLine |
sales recurring lines create |
Adds one line to a recurring sale. |
Update-RecurringSale |
sales recurring update |
Sparse update of a recurring sale. |
Update-RecurringSaleLine |
sales recurring lines update |
Sparse update of one recurring-sale line. |
Remove-RecurringSaleLine |
sales recurring lines delete |
Deletes one line. Confirmation: High. |
Remove-RecurringSale |
sales recurring delete |
Deletes a recurring sale. Confirmation: High. |
| Cmdlet | CLI equivalent | What it does |
|---|---|---|
Get-SalesPerson |
sales person list, get, page |
Lists sales people (-All reads every one), gets one by -Number, or reads one page with -Page and -Count. |
New-SalesPerson |
sales person create |
Creates a sales person. |
Update-SalesPerson |
sales person update |
Sparse update of a sales person. |
Remove-SalesPerson |
sales person delete |
Deletes a sales person. Confirmation: High. |
New-Invoice takes the customer and one or more lines. -Line is one hashtable, [pscustomobject], or a list of them, such as the rows Import-Csv produces. Every line needs an ItemCode; the other keys are Quantity (default 1), UnitPrice, Description, SecondaryDescription, Memo, Warehouse, Reference, DiscountPercent, DiscountAmount, Total, Dimension1, and PricesIncludeTax.
Posting is the default. -Post is a Boolean that defaults to $true, so the invoice is created and posted, which is irreversible. The cmdlet is Medium impact and does not prompt. Pass -Post:$false to create an unposted invoice (the request carries post=false), and preview with -WhatIf, which reads Create and post and sends nothing:
# Preview: nothing is sent
New-Invoice C-1 -Line @{ ItemCode = 'A'; Quantity = 4; UnitPrice = 1000 } -WhatIf
# Create and post one invoice
New-Invoice C-1 -Line @{ ItemCode = 'A'; Quantity = 4; UnitPrice = 1000 }
# Create an unposted invoice with two lines
New-Invoice C-1 -SalesPerson S-1 -Reference 'Order 77' -Date 2026-10-12 -Post:$false -Line @(
@{ ItemCode = 'A'; Quantity = 4; UnitPrice = 1000 }
@{ ItemCode = 'B'; Description = 'Fitting; 2=1 adapter'; DiscountPercent = 2.5 }
)
# Lines from a CSV file with the header ItemCode,Quantity,UnitPrice
New-Invoice C-1 -Line (Import-Csv lines.csv) -Post:$false
# A whole document from a JSON file or a hashtable
New-Invoice -Path ./invoice.json -Post:$false
New-Invoice -InputObject @{ Customer = @{ Number = 'C-1' }; Lines = @(@{ ItemCode = 'A'; Quantity = 2 }) }
-Reference, -Date (default: now), -DueDate, -CurrencyCode (alias -Currency), -ExchangeRate, -PaymentTerm, -PaymentMode, -HeaderText1, -HeaderText2, -ProjectNumber (alias -Project), -CustomerOrderNumber, -CustomerOrderDate, -SaleType (default Debit), and -OriginalPrices. DK Plus derives the due date and currency when you leave them out..; '4,5' is rejected whatever the culture. A blank cell in an Import-Csv row counts as not given (the quantity then defaults to 1); it is never sent as an empty string. DK Plus wire spellings such as Price or Text are rejected with the member name to use.-Line, -InputObject, and -Path are separate parameter sets, and -Line does not take pipeline input. The cmdlet writes the invoice DK Plus returns.These cmdlets create the head only. A document with Lines is refused before any request, naming the line cmdlet to use. The output is the created document, and its Id binds the line cmdlets from the pipeline:
$order = New-Order C-1 -Reference 'Web order 77' -Date 2026-10-12
$order | New-OrderLine -ItemCode A -Quantity 2 -UnitPrice 1000
$order | New-OrderLine -ItemCode B -Memo 'second line'
$quote = New-Quote C-1 -ValidFrom 2026-11-01 -ValidUntil 2026-11-30
$quote | New-QuoteLine -ItemCode A
$sale = New-RecurringSale C-1 -Group Monthly
$sale | New-RecurringSaleLine -ItemCode HOST -Quantity 1
New-Order -Path ./order.json
New-OrderLine 38e492ef-6169-43e1-8798-4d06ab60ee87 -InputObject @{ ItemCode = 'A'; Description = 'Fitting'; Quantity = 2 }
-AutoCreateCustomer:$false sends AutoCreateCustomer=false to ask DK Plus not to; how DK Plus answers a missing customer is not verified live. Without the parameter the library default applies.-Number can address an existing document. Giving -Number of an existing document may make DK Plus update it instead of creating a new one (not verified live), so give -Number only when you mean that document.-SalesPerson wins, then the salesPerson setting (Set-Config -SalesPerson S-7, shared with devop-dk config set salesPerson), and otherwise no sales person is sent and DK Plus uses the API user's. A blank -SalesPerson counts as not given; a document's own SalesPerson always wins over the setting. This holds for New-Invoice too.New-...Line takes the line fields (-ItemCode, -Quantity, -UnitPrice, and others, see Get-Help New-OrderLine) or an -InputObject or -Path document without Sequence: DK Plus assigns the sequence, and a top-level Sequence is rejected. A call that sets no member, or only blank values, fails before any request. A quote piped into New-OrderLine is rejected before any request.New-OrderLine writes the created line (with an OrderId property, so ... | Update-OrderLine -Quantity 3 works). DK Plus returns no line for quotes and recurring sales, so New-QuoteLine and New-RecurringSaleLine write nothing; read the document back with Get-Quote -Id or Get-RecurringSale -Id.Get-Quote returns the UUID in the Id property, and Update-Quote -Id binds it from the pipeline. This changes the customer of quote number 12345:
Get-Quote -Number 12345 | Update-Quote -Customer 10001
-Customer takes a customer number. The update sends only the customer number: {"Customer":{"Number":"10001"}} plus the quote's identifier. Whether DK Plus keeps or replaces the stored customer name and address on the quote is not confirmed against a live company, so check the result.
More updates:
# Reference and status of one order
Update-Order 38e492ef-6169-43e1-8798-4d06ab60ee87 -Reference PO-77 -Status OnHold
# Change the customer of the orders found by number
Get-Order -Number 1001 | Update-Order -Customer 10001
# Validity of a quote
Update-Quote 0b7e1a50-2f7a-4f1e-8f55-1c3f9d6b4a22 -ValidFrom 2026-11-01 -ValidUntil 2026-11-30 -Status Sent
# Move a customer's recurring sales to another group
Get-RecurringSale -Customer 10001 | Update-RecurringSale -Group QUARTERLY
Line cmdlets take the document UUID and the line Sequence. Lines read from a document carry both, so you can pipe them:
# Change a quantity
Update-OrderLine 38e492ef-6169-43e1-8798-4d06ab60ee87 2 -Quantity 2.5
# Clear the memo of every line of an order
(Get-Order -Id $id).Lines | Update-OrderLine -Memo ''
# Preview deleting the lines of one product
(Get-Order -Id $id).Lines | Where-Object ItemCode -eq P-9 | Remove-OrderLine -WhatIf
You can also change one line through the document. This sends only PUT .../Line/1 and no document head:
Update-Order $id -InputObject @{ Lines = @(@{ Sequence = 1; Quantity = 2 }) }
# Default file name in the current location: 12345.pdf
Save-InvoicePdf 12345
# A chosen path with a custom layout; creates the folder, replaces an existing file
Save-InvoicePdf 12345 -Path ./pdf/invoice-12345.pdf -Custom layout-b -Force
# Find, then save
Get-Invoice 12345 | Save-InvoicePdf
# Orders and quotes use sales-order-<number>.pdf and sales-quote-<number>.pdf
Save-OrderPdf 1001
Save-QuotePdf 12345
# HTML as text, or straight to a file
Get-InvoiceHtml 12345 | Set-Content ./invoice.html
Get-OrderHtml 1001 -Path ./order-1001.html
# Preview an email, then send it from a script
Get-Invoice 12345 | Send-InvoiceEmail -To [email protected] -WhatIf
Send-InvoiceEmail 12345 -To [email protected] -Subject 'Invoice 12345' -Confirm:$false
All Save-* cmdlets take -Path (alias -Output) and -Force. An existing file is refused before any request unless you pass -Force. -Path names one file: when a second piped record arrives, the command ends with the terminating DkPlus.OutputPathReused error before that record's request. Use the default file names for batches, or loop and build a path per record:
Get-Order -Status OnHold | ForEach-Object { Save-OrderPdf $_.Number -Path "./pdf/order-$($_.Number).pdf" }
Get-InvoiceHtml, Get-OrderHtml, and Get-QuoteHtml write a non-terminating DkPlus.NotFound error when DK Plus returns no HTML. Get-Invoice -Number and Get-Order -Id write the same error for a document that does not exist.
See Output and files for the Save-* rules and Safety and errors for confirmations.
Get-SalesPerson -Take 50
New-SalesPerson S-9 -Name 'Example Person' -Warehouse MAIN
Update-SalesPerson S-9 -Warehouse MAIN
Get-SalesPerson S-9 | Update-SalesPerson -EmployeeNumber ''