commandline port test on windows powershell without telnet
- No Comments
- Mar, 09, 2017
- Angelo Schalley
- Networking, Powershell, security, Windows-Microsoft
On most of the newly installed windows server the telnet client is not enabled.
If you want to test if a remote port is open you can use a powershell command:
Read more on commandline port test on windows powershell without telnet…
Powershell commandline mailing , send mail
- No Comments
- Dec, 19, 2010
- Angelo Schalley
- Exchange, Powershell, Windows-Microsoft
statusmailer.ps1 :
$data can be any data you want to send.
$data = Get-ChildItem “\\10.10.102.249\backup\” | sort-object -property @{Expression={$_.LastWriteTime}; Descending=$true} | format-table LastWriteTime,Length,Name -auto | out-string
$emailFrom = “backup@domain.be”
$emailTo = “user@domain.be”
$subject = “backupverslag LINIX”
$body = $data
$smtpServer = “10.10.10.1”
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$smtp.Send($emailFrom, $emailTo, $subject, $body)
Read more on Powershell commandline mailing , send mail…