Need help in Parsing an output

Hello Everyone,

I’m really sorry, if the question is so lame. I not an expert of power shell and little comfortable working on it just because of PSADK.

the idea to revoke\release few license based on few conditions

license status can be fetched through a command line and the sample output is below

--------------------------------------------------------------------
Trust Flags       = FULLY TRUSTED
Fulfillment Type: TRIAL
Status: ENABLED
Fulfillment ID: LOCAL_TRIAL_FID_586
Entitlement ID: SC_LVJ1BYNH8ZF6H57OSCBZTFWPVR7PCR8
Product ID: NAME=Tableau Desktop TS;VERSION=4.0
Suite ID: NONE
Expiration date: 23-oct-2020
Feature line(s):


INCREMENT TableauDesktop tableau 2021.1108 permanent 1 \
        VENDOR_STRING=EntitlementID=;EDITION=Professional;CAP=REG:STANDARD,WARN:14,NOGRACE;DC_STD=default;DC_CAP=;TRIALVER=2019.1;FulfillmentID=;ActivationID=;OEMNAME=;GRACE=;MAP_STD=default;MAP_CAP=;OFFLINE= \
        ISSUER="Tableau Software" ISSUED=9-nov-2018 START=8-nov-2018 \
        TS_OK SIGN="042D 811B 5D78 81EA E6E7 28BD 607A F3D3 028E DC82 \
        E310 A6BC C1D5 0913 5CBC 18B5 8671 7C7D C0B7 3C46 D1E7 A16C \
        6C84 3694 BB4C DB73 4B59 C419 D820 58E0"

--------------------------------------------------------------------

Trust Flags       = FULLY TRUSTED
Fulfillment Type: TRIAL
Status: ENABLED
Fulfillment ID: LOCAL_TRIAL_FID_590
Entitlement ID: SC_LVJ1BYNH8ZF6H57OSCBZTFWPVR7PTR2
Product ID: NAME=Tableau Desktop TS;VERSION=4.0
Suite ID: NONE
Expiration date: 23-oct-2020
Feature line(s):


INCREMENT TableauDesktop tableau 2021.1108 permanent 1 \
        VENDOR_STRING=EntitlementID=;EDITION=Professional;CAP=REG:STANDARD,WARN:14,NOGRACE;DC_STD=default;DC_CAP=;TRIALVER=2019.1;FulfillmentID=;ActivationID=;OEMNAME=;GRACE=;MAP_STD=default;MAP_CAP=;OFFLINE= \
        ISSUER="Tableau Software" ISSUED=9-nov-2018 START=8-nov-2018 \
        TS_OK SIGN="042D 811B 5D78 81EA E6E7 28BD 607A F3D3 028E DC82 \
        E310 A6BC C1D5 0913 5CBC 18B5 8671 7C7D C0B7 3C46 D1E7 A16C \
        6C84 3694 BB4C DB73 4B59 C419 D820 58E0"

--------------------------------------------------------------------

we need to parse the “Trust Flags”, “status” and “Entitlement ID” from both the entries in to an hash-table so that we can perform logical operation and revoke

Doesn’t seem hard to write a loop that would go over this log and format it into a table. The main question is whether the log is consistent. Whether the text youre looking for is only on one line and it is always there etc. If you are sure that it is consistent then yes, this will be easy.