Der Value vom Key-Wert mit dem Seperator ":" soll verändert werden.
Was ist passiert?
Die Funktion setzt fehlerhaft am Ende der Liste <key><seperator><value> an, anstatt beim passenden Key das Value zu ersetzen.
Beispiel:
Code: Alles auswählen
DefStringList $LIST_BLA$ = powershellcall('Get-Tpm')
Set $LIST_BLA$ = setValueByKey("TpmPresent","BLA",$LIST_BLA$,":")Code: Alles auswählen
[7] [2026-08-04 13:16:08.639] [] defined global string list $LIST_BLA$
[5] [2026-08-04 13:16:08.660] [] PowershellCall: Get-Tpm (mode: sysnative)
[6] [2026-08-04 13:16:10.603] [] ExitCode 0
[7] [2026-08-04 13:16:10.610] [] The value of the variable "$LIST_BLA$" is now:
[7] [2026-08-04 13:16:10.615] [] (string 0)
[7] [2026-08-04 13:16:10.621] [] (string 1)
[7] [2026-08-04 13:16:10.628] [] (string 2)TpmPresent : False
[7] [2026-08-04 13:16:10.633] [] (string 3)TpmReady : False
[7] [2026-08-04 13:16:10.639] [] (string 4)TpmEnabled : False
[7] [2026-08-04 13:16:10.644] [] (string 5)TpmActivated : False
[7] [2026-08-04 13:16:10.650] [] (string 6)TpmOwned : False
[7] [2026-08-04 13:16:10.656] [] (string 7)RestartPending : False
[7] [2026-08-04 13:16:10.661] [] (string 8)ManufacturerId : 0
[7] [2026-08-04 13:16:10.666] [] (string 9)PpiVersion :
[7] [2026-08-04 13:16:10.671] [] (string 10)ManufacturerIdTxt :
[7] [2026-08-04 13:16:10.677] [] (string 11)ManufacturerVersion :
[7] [2026-08-04 13:16:10.683] [] (string 12)ManufacturerVersionFull20 :
[7] [2026-08-04 13:16:10.689] [] (string 13)ManagedAuthLevel : Full
[7] [2026-08-04 13:16:10.696] [] (string 14)OwnerAuth :
[7] [2026-08-04 13:16:10.700] [] (string 15)OwnerClearDisabled : True
[7] [2026-08-04 13:16:10.705] [] (string 16)AutoProvisioning : NotDefined
[7] [2026-08-04 13:16:10.711] [] (string 17)LockedOut : False
[7] [2026-08-04 13:16:10.717] [] (string 18)LockoutHealTime :
[7] [2026-08-04 13:16:10.724] [] (string 19)LockoutCount :
[7] [2026-08-04 13:16:10.729] [] (string 20)LockoutMax :
[7] [2026-08-04 13:16:10.734] [] (string 21)SelfTest :
[7] [2026-08-04 13:16:10.742] [] The value of the variable "$LIST_BLA$" is now:
[7] [2026-08-04 13:16:10.750] [] (string 0)
[7] [2026-08-04 13:16:10.756] [] (string 1)
[7] [2026-08-04 13:16:10.761] [] (string 2)TpmPresent : False
[7] [2026-08-04 13:16:10.766] [] (string 3)TpmReady : False
[7] [2026-08-04 13:16:10.771] [] (string 4)TpmEnabled : False
[7] [2026-08-04 13:16:10.777] [] (string 5)TpmActivated : False
[7] [2026-08-04 13:16:10.784] [] (string 6)TpmOwned : False
[7] [2026-08-04 13:16:10.790] [] (string 7)RestartPending : False
[7] [2026-08-04 13:16:10.795] [] (string 8)ManufacturerId : 0
[7] [2026-08-04 13:16:10.800] [] (string 9)PpiVersion :
[7] [2026-08-04 13:16:10.807] [] (string 10)ManufacturerIdTxt :
[7] [2026-08-04 13:16:10.813] [] (string 11)ManufacturerVersion :
[7] [2026-08-04 13:16:10.819] [] (string 12)ManufacturerVersionFull20 :
[7] [2026-08-04 13:16:10.826] [] (string 13)ManagedAuthLevel : Full
[7] [2026-08-04 13:16:10.829] [] (string 14)OwnerAuth :
[7] [2026-08-04 13:16:10.835] [] (string 15)OwnerClearDisabled : True
[7] [2026-08-04 13:16:10.841] [] (string 16)AutoProvisioning : NotDefined
[7] [2026-08-04 13:16:10.848] [] (string 17)LockedOut : False
[7] [2026-08-04 13:16:10.852] [] (string 18)LockoutHealTime :
[7] [2026-08-04 13:16:10.857] [] (string 19)LockoutCount :
[7] [2026-08-04 13:16:10.862] [] (string 20)LockoutMax :
[7] [2026-08-04 13:16:10.867] [] (string 21)SelfTest :
[7] [2026-08-04 13:16:10.873] [] (string 22)TpmPresent:BLA
[1] [2026-08-04 13:16:10.887] [] ___________________
[1] [2026-08-04 13:16:10.892] [] script finished: success- opsi-client-agent: 4.3.22.7
- opsi-script: 4.12.21.0-10