Microsoft
Software
Hardware
Network
Question : Massage Data From CLI into Array
I have data in the below format that I'd like to get into a powershell array so I can step through it in a ForEach loop, I think you can see what i'd need as the column headers and the data in each column:
CDRXHelp 8.0 - CDR External Base Line Helper Tool
Setting focus to Instance001
Setting focus client name to file01
Installed IDAs
AppId: 84, Name: Continuous Data Replicator
REPID PAIRID SrcPath DestPath Dest Machine
213 433 D:\SiteShare\Data Q:\file01\SiteData\D\SiteS
hare\Data server1
213 434 D:\SiteShare\UserData Q:\file01\SiteData\D\SiteS
hare\UserD
ata server1
All suggestions are much appreciated.
Michael
Answer : Massage Data From CLI into Array
Hi Michael,
Want to drop the first few lines or preserve them?
This picks up from line 5 and returns everything else as an object, if you'd like to give it a try?
Cheers,
Chris
1: 2:
$Data = WhateverComandYouRan $Data[5..$($Data.Count)] -Replace '\s{2,}', ',' | ConvertFrom-Csv
Random Solutions
Run Windows 2008 Server in virtual environment on Windows 7 PRO?
Modify desktop icon size via registry in Server 2008
The session setup from computer 'PcName' failed because the security database does not contain a trust account 'PcName$' referenced by the specified computer.
Teaching iPhone app creation...Any advice?
problems with specific user in exchange 2003 environment
Check a OU where all user accounts available and get the Exchange mailbox database.
Does ADO.Net provides any standard processo to swith to/from connected to disconnected datasource?
Which Java IDE is as friendly as Visual Studio
Access is denied, unable to remove device when trying to delete a printer.
exchange 2010 transport hangs on starting