I have the ouput of an IBM Tivoli command that is really a bunch of keys and values, it looks like this
Name : NT_Paging_File_Warning
Full Name :
Description : Knt:KNT1340
Type : Windows OS
Formula : *IF *VALUE NT_Paging_File.%_Usage *GE 75 *AND *VALUE NT_Paging_File.%_Usage *LT 0 *AND *VALUE NT_Paging_File.Pagefile_Name_U *NE _Total
Sampling Interval : 0/0:15:0
Run At Start Up : Yes
Distribution :
Text : ADVICE("knt:"+$ISITSTSH.SITNAME$);
Action Location : Agent
Action Selection : System Command
System Command : *NONE
True For Multiple Items: Action on First Item only
TEC Severity : Warning
TEC Forwarding :
TEC Destination :
I want to efficiently take that output and cast it into a powershell object with the obvious attributes and values. As you can see some values may be empty and some attributes have spaces in the names. The :
is the standard seperation between key and value.
What is a nice clean powershell way to go about this?
The reason I want to do this, is to send these records as objects down the pipe where I will use things like Where-Object on them to filter out the ones I want, etc, etc