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

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

Summary

Details

Page properties
Content
... ... @@ -13,10 +13,40 @@
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: Get-Help ===
16 +=== Beispiel 1 ===
17 17  
18 -{{apimacro title="Get-Help"}}
19 -{{code language="PowerShell"}}
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 + "}}
20 20  PS C:\Program Files (x86)\Aagon\AESB Shell> Get-Help Acmp-SaveContacts_V3
21 21  
22 22  NAME
... ... @@ -33,16 +33,38 @@
33 33  REMARKS
34 34   None
35 35  {{/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: Speichern von Kontakten ===
69 +=== Beispiel 2 ===
41 41  
42 -{{apimacro title="Speichern von Kontakten"}}
43 -Text
44 -{{/apimacro}}
71 +{{code language="PowerShell" layout="LINENUMBERS" title="**Beispiel: Speichern von Kontakten**"}}
45 45  
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 +
46 46  Anhand der Antwort der Public API ist eine Fehlerbehandlung möglich.
47 47  
48 48  
© Aagon GmbH 2025
Besuchen Sie unsere Aagon-Community