Powershell script, get locked account from multiple Windows 2008 servers

Param(
[Parameter(Mandatory=$True)]
[string]$Username,

[Parameter(Mandatory=$False)]
[array]$Computers=@(“ad-server1”, “ad-server2”)
)

$Date = [DateTime]::Now.AddDays(-2)
Get-EventLog “Security” -after $Date -computer $Computers | Where-Object { $_.InstanceID -eq 4740 -or $_.InstanceID -eq 4625} | ? { $_.message -match $Username} | fl TimeGenerated, Message

Send mail via VB Script and Telnet

VB Script:

Option explicit
Dim oShell
set oShell= Wscript.CreateObject(“WScript.Shell”)
oShell.Run “telnet”
WScript.Sleep 1000
oShell.Sendkeys “open mail.server 25~”
WScript.Sleep 1000
oShell.Sendkeys “helo test~”
WScript.Sleep 500
oShell.Sendkeys “mail from:from@domain.com~”
WScript.Sleep 500
oShell.Sendkeys “rcpt to:to@domain.com~”
WScript.Sleep 500
oShell.Sendkeys “Data~”
WScript.Sleep 500
oShell.Sendkeys “Subject: Subject for the mail~”
oShell.Sendkeys “From: Sender~”
oShell.Sendkeys “TO: Reciver~”
oShell.Sendkeys “.~”
WScript.Sleep 5000
oShell.Sendkeys “quit~”
Wscript.Quit