Last modified by jklein on 2025/06/16 08:23

From version 2.1
edited by jklein
on 2025/06/16 07:55
Change comment: There is no comment for this version
To version 4.2
edited by jklein
on 2025/06/16 07:59
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -13,11 +13,10 @@
13 13  
14 14  Welcher Datentyp in welchem Cmdlet verwendet werden muss, können Sie sich über die Hilfe des jeweiligen Cmdlets anzeigen lassen.
15 15  
16 -=== Beispiel 1 ===
16 +=== Beispiel 1: Get-Help ===
17 17  
18 -{{code language="PowerShell" layout="LINENUMBERS" title="
19 -
20 - "}}
18 +{{apimacro title="Get-Help"}}
19 +{{code language="PowerShell"}}
21 21  PS C:\Program Files (x86)\Aagon\AESB Shell> Get-Help Acmp-SaveContacts_V3
22 22  
23 23  NAME
... ... @@ -34,38 +34,16 @@
34 34  REMARKS
35 35   None
36 36  {{/code}}
36 +{{/apimacro}}
37 37  
38 38  An diesem Output ist ersichtlich, dass das Cmdlet eine Liste von **TContact_V3** erwartet. Es müssen also Kontakte mithilfe von **New-TContact_V3** erstellt und befüllt werden.
39 39  
40 -=== Beispiel 2 ===
40 +=== Beispiel 2: Speichern von Kontakten ===
41 41  
42 -{{code language="PowerShell" layout="LINENUMBERS" title="**Beispiel: Speichern von Kontakten**"}}
42 +{{apimacro title="Speichern von Kontakten"}}
43 +Text
44 +{{/apimacro}}
43 43  
44 -# Erstellen einer Liste
45 -$contacts = @()
46 -
47 -# Erstellen eines Kontakts
48 -$testContact = New-TContact_V3
49 -$testContact.ID = [guid]::NewGuid().ToString()
50 -$testContact.Name = "Max"
51 -$testContact.FamilyName = "Musterman"
52 -$testContact.Email = "mmusterman@testmail.de"
53 -
54 -# Hinzufügen des Kontakts zur Liste
55 -$contacts += $testContact
56 -
57 -# Ausführen des Public Api commands
58 -$result = Acmp-SaveContacts_V3 -Contacts $contacts
59 -
60 -# Ausgabe des results
61 -$result
62 -
63 -
64 -FirstErrorMsg ResultCode ResultMessage
65 -------------- ---------- -------------
66 - 0 OK
67 -{{/code}}
68 -
69 69  Anhand der Antwort der Public API ist eine Fehlerbehandlung möglich.
70 70  
71 71  
© Aagon GmbH 2025
Besuchen Sie unsere Aagon-Community