I need to grep particular details from a file and save that to another file.
Here is the file contents :
Name : abc
CollationName : xxxxxxxxx
Edition : System
MaxSizeGB : 5
MaxSizeBytes : 5368709120
ServiceObjectiveName : System
ServiceObjectiveAssignmentStateDescription : Complete
CreationDate : 02-Jul-14 4:14:19 AM
RecoveryPeriodStartDate : 02-Jul-14 4:14:19 AM
Name : def
CollationName : xxxxxxxxxxxxx
Edition : Standard
MaxSizeGB : 250
MaxSizeBytes : 268435456000
ServiceObjectiveName : S2
ServiceObjectiveAssignmentStateDescription : Complete
CreationDate : 25-Jan-15 6:39:41 PM
RecoveryPeriodStartDate : 01-Mar-15 3:00:00 AM
Name : ghi
CollationName : xxxxxxxx
Edition : Standard
MaxSizeGB : 250
MaxSizeBytes : 268435456000
ServiceObjectiveName : S2
ServiceObjectiveAssignmentStateDescription : Complete
CreationDate : 25-Jan-15 3:19:01 PM
RecoveryPeriodStartDate : 01-Mar-15 3:00:00 AM
Name : hjiyt
CollationName : xxxxxxxxxxxxxxxx
Edition : Standard
MaxSizeGB : 250
MaxSizeBytes : 268435456000
ServiceObjectiveName : S2
ServiceObjectiveAssignmentStateDescription : Complete
CreationDate : 11-Mar-15 11:07:30 AM
RecoveryPeriodStartDate : 11-Mar-15 11:37:31 AM
From this file I need to create a file with Name and creation date only. so the output file should be like as follows :
abc 02-Jul-14 4:14:19 AM
def 25-Jan-15 6:39:41 PM
ghi 25-Jan-15 3:19:01 PM
hjiyt 11-Mar-15 11:07:30 AM
It would be great if anyone help me to do this using powershell.
Thanks in advance
Get-Content,about_split,Foreach-Object,regex.