Monday

powershell search string

this is powershell script to search into log files but it could search into any text base files like csv,xml or json: id displays list of files when search string found:
      
cd c:\inetpub\Data\logs
Get-ChildItem -Recurse *.* | Select-String -Pattern "my search string" | Select-Object -Unique Path

No comments:

test smtp server with powershell

Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body ...