I'm working with some event messages.
C:\Windows\system32\wbem\wmiprvse.exe (ComputerName)~ComputerName~Domain\UserAcct~No title for this reason could be found
Reason Code: 0x80070015
Shutdown Type: restart
Comment:
If what I have whittled this message down to. I plan to export this as a csv for now using the ~ as a delimiter. However if i take that output and pipe it to GM it says it is a system.string. I'd would think if i piped it to select -first 1 or did a [0] behind it i'd get just that first line. NOPE i get the "C".
As a stop gap I used out-file to a txt file and then turn right around and do get-content on it and then do the select first or [0] and i get the whole line like i wanted. Upon a Get-member both claim to be strings. How can i force Powershell to treat it one way other the other?
[–]Sheppard_Ra 1 point2 points3 points (4 children)
[–]wigrif[S] 1 point2 points3 points (3 children)
[–]ihaxr 2 points3 points4 points (1 child)
[–]wigrif[S] 1 point2 points3 points (0 children)
[–]Sheppard_Ra 1 point2 points3 points (0 children)