I have this command:
Get-WmiObject win32_service |
? {$_.Name -like '*Front*'} |
? {$_.PathName -like '*logdir*'} |
select Name, PathName
Its ouput is like:
Frontapp (Frontapp1) D:\Application\Frontapp\Frontapp.exe -service -dbType mssql -ORBSvcConf D:\Frontapp83\Frontapp\svc.conf -connections 5 -connectionPoolSize 64 -logdir D:\Frontapp\log1
Frontapp (Frontapp0) D:\Frontapp83\Frontapp\Frontapp.exe -service -dbType ora -ORBSvcConf D:\Frontapp83\Frontapp\svc.conf -connections 35 -connectionPoolSize 64 -logdir D:\Frontapp\log0
How can I remove information from the output, just to obtain the -logdir path.
The output needed:
Frontapp (Frontapp1) D:\Frontapp\log1
Frontapp (Frontapp0) D:\Frontapp\log0