Cmdlets for MYOB

Build 24.0.9060

Remove-MYOB Cmdlet

Parameters   Output Objects  

Deletes MYOB data.

Syntax

Remove-MYOB [parameters]

Remarks

The Remove-MYOB cmdlet allows you to use a syntax similar to SQL DELETE statements to delete MYOB data.

$conn = Connect-MYOB If using an online instance: -InitiateOAuth "GETANDREFRESH" -OAuthClientId "YourClientId" -OAuthClientSecret "YourClientSecret" -CallbackURL "http://localhost:33333" -CompanyFileId "327eed10-9615-4e5e-bd9e-ae2cc00e2c70" -User "companyFileUser" -Password "companyFilePassword" If using an on premise instance:   -InitiateOAuth "OFF" -URL "http://localhost:8080/accountright" -CompanyFileId "327eed10-9615-4e5e-bd9e-ae2cc00e2c70" -User "companyFileUser" -Password "companyFilePassword"
Remove-MYOB -Connection $conn -Table "Accounts" -Id "6186169c-6540-4d72-8bfe-ecc706e500ee"
The Where parameter can also be used to specify the primary key:
Remove-MYOB -Connection $conn -Table "exTablePowershell;" -Where "Id = 6186169c-6540-4d72-8bfe-ecc706e500ee"
The primary key can also be passed to the cmdlet along the pipeline:
Select-MYOB -Connection $conn -Table Accounts -Where "Type = 'Bank'" | Remove-MYOB

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060