Remove-MYOB Cmdlet
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