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

From version 1.1
edited by jklein
on 2025/06/16 07:54
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,40 +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 -{{apimacro}}{{/apimacro}}
19 -
20 -(% class="showhide-header" data-show-duration="$effectduration" data-show-effect="$effect" %)
21 -(((
22 -(% class="showhide-header-flex" %)
23 -(((
24 -(% class="showhide-title" %)
25 -(((
26 -**Beispiel: Get-Help**
27 -)))
28 -
29 -(% class="showhide-title" %)
30 -(((
31 -
32 -)))
33 -
34 -(% class="showhide-arrow" %)
35 -(((
36 -▶
37 -)))
38 -)))
39 -)))
40 -
41 -(% class="showhidecontent" style="display: none;" %)
42 -(((
43 -
44 -)))
45 -
46 -{{code language="PowerShell" layout="LINENUMBERS" title="
47 -
48 -
49 - "}}
18 +{{apimacro title="Get-Help"}}
19 +{{code language="PowerShell"}}
50 50  PS C:\Program Files (x86)\Aagon\AESB Shell> Get-Help Acmp-SaveContacts_V3
51 51  
52 52  NAME
... ... @@ -63,38 +63,16 @@
63 63  REMARKS
64 64   None
65 65  {{/code}}
36 +{{/apimacro}}
66 66  
67 67  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.
68 68  
69 -=== Beispiel 2 ===
40 +=== Beispiel 2: Speichern von Kontakten ===
70 70  
71 -{{code language="PowerShell" layout="LINENUMBERS" title="**Beispiel: Speichern von Kontakten**"}}
42 +{{apimacro title="Speichern von Kontakten"}}
43 +Text
44 +{{/apimacro}}
72 72  
73 -# Erstellen einer Liste
74 -$contacts = @()
75 -
76 -# Erstellen eines Kontakts
77 -$testContact = New-TContact_V3
78 -$testContact.ID = [guid]::NewGuid().ToString()
79 -$testContact.Name = "Max"
80 -$testContact.FamilyName = "Musterman"
81 -$testContact.Email = "mmusterman@testmail.de"
82 -
83 -# Hinzufügen des Kontakts zur Liste
84 -$contacts += $testContact
85 -
86 -# Ausführen des Public Api commands
87 -$result = Acmp-SaveContacts_V3 -Contacts $contacts
88 -
89 -# Ausgabe des results
90 -$result
91 -
92 -
93 -FirstErrorMsg ResultCode ResultMessage
94 -------------- ---------- -------------
95 - 0 OK
96 -{{/code}}
97 -
98 98  Anhand der Antwort der Public API ist eine Fehlerbehandlung möglich.
99 99  
100 100  
© Aagon GmbH 2025
Besuchen Sie unsere Aagon-Community