Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Powershell: how to format Get-Childitem for email?
- $mailbody += "<p>" + (get-childitem $path | select-object Name | Out-String -width 40) + "</P>"
- get-childitem $path | select-object Name | ConvertTo-Html -fragment
- $path = "C:"
- [string] $html = dir $path | ConvertTo-Html
- $smptServer = ''
- $to = ''
- $from = ''
- $subject = 'Test'
- Send-MailMessage -To $to -From $from -Body $html -BodyAsHtml -SmtpServer $smptServer -Subject $subject
- [string] $html = dir $path | Select Mode, LastWriteTime, Length, Name | ConvertTo-Html
Advertisement
Add Comment
Please, Sign In to add comment