Need Out-file formatting help
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Need Out-file formatting help
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.txtCan 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.
Need Out-file formatting help
This is more fun if you want it to look good.
Code: Select all
PS>dir c:windows -rec -exc *.exe,*.dll,*.bat,*.cmd|convertto-html -property fullname > c:dirlist.htmPS>c:dirlist.htm
[/code.
You can add style sheets and custom formatting using the "ConvertTo-Html" CmdLet.jvierra2008-04-22 12:27:55