Hello,
I'm a newbie to Powershell and I found this script to search for files containing SSN and it seems to work but my out-file seems to be unformatted and very hard to read.
Get-ChildItem -rec -exclude *.exe,*.dll |select-string "[0-9]{3}[-| ][0-9]{2}[-| ][0-9]{4}" |out-file C:\1.txt
Can someone tell me how do I get the out-file to only list the path and file name of the file containing SSN? I think the problem might be that the path to most of those files are very long and can be nested like 6 sub-folders deep.
Thanks in advance.
I'm a newbie to Powershell and I found this script to search for files containing SSN and it seems to work but my out-file seems to be unformatted and very hard to read.
Get-ChildItem -rec -exclude *.exe,*.dll |select-string "[0-9]{3}[-| ][0-9]{2}[-| ][0-9]{4}" |out-file C:\1.txt
Can someone tell me how do I get the out-file to only list the path and file name of the file containing SSN? I think the problem might be that the path to most of those files are very long and can be nested like 6 sub-folders deep.
Thanks in advance.