I'm very new to Powershell. Only have been using it for about 2 weeks.
I have a file that is structured like this:
Service name: WSDL Service ID: 14234321885 Service resolution path: /gman/wsdlUpdte Serivce endpoints: -------------------------------------------------------------------------------- Service name: DataService Service ID: 419434324305 Service resolution path: /widgetDate_serv/WidgetDateServ Serivce endpoints: http://servername.company.com:1012/widgetDate_serv/WidgetDateServ -------------------------------------------------------------------------------- Service name: SearchService Service ID: 393234543546 Service resolution path: /ProxyServices/SearchService Serivce endpoints: http://servername.company.com:13010/Services/SearchService_5_0 http://servername2.company.com:13010/Services/SearchService_5_0 -------------------------------------------------------------------------------- Service name: Worker Service ID: 14187898547 Service resolution path: /ProxyServices/Worker Serivce endpoints: http://servername.company.com:131009/Services/Worker/v9 --------------------------------------------------------------------------------
I'd like to parse the file and have Service name, Service ID, Service Resolution Path and Service Endpoints (which sometimes contain multiple or no values) in individual columms (CSV).
Beyond using Get-Content and looping through the file, I have no idea even where to start.
Any help will be appreciated. Thanks
See Question&Answers more detail:os