• RSS
  • Twitter
  • FaceBook

Exchange Server Forums

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

Telnet to CAS/HT Works OK But powershell and blat doesn't

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [Microsoft Exchange 2007] >> Message Routing >> Telnet to CAS/HT Works OK But powershell and blat doesn't Page: [1]
Login
Message << Older Topic   Newer Topic >>
Telnet to CAS/HT Works OK But powershell and blat doesn't - 15.Nov.2011 5:37:17 PM   
NoDramas

 

Posts: 5
Joined: 3.Mar.2009
Status: offline
Hi Guys,
I have been trying to run the standard type of PowerShell send mail script and am getting:

[DBG]>>> Hit Line breakpoint on 'C:\Scripts\Health\ExchangeHealth.ps1:234'
[DBG]>>> Stopped at: if ($_.FullyQualifiedErrorId -ne "NativeCommandErrorMessage" -and $ErrorView -ne "CategoryView") {
********************************

$Date = (get-date)
$Output = ".\AdHocTests_" + "{0:yyyyMMdd_HHmm}" -f (Get-Date) + ".txt"
$RunFrom = (get-location)
$Computer = gc env:computername

# Set location
set-location C:\Scripts\AdHocTests\

# Create text file
New-Item -ItemType file $Output -Force

Test-MAPIConnectivity -server SERVER1.DOMAIN.COM | Out-File -encoding ASCII .\$Output -append


$OutputRead = (get-content $Output)
$smtpServer = "mail.nzcomms.co.nz"
$emailFrom = "Exchange_Admin@NZC.CO.NZ"
$emailTo = "Tim.West@2DegreesMobile.co.nz"
$subject = "Exchange 2007 AD Hoc Health - $date"
$body = New-object System.Text.StringBuilder
foreach($line in $OutputRead)
{
[void] $body.AppendLine($line.ToString())
}

# Send Email
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$smtp.Send($emailFrom, $emailTo, $subject, $body.ToString())

####################

A Known good VB Script and blat are not working either. Am new at the company and they have no scripts that email in the Windows space.

Remote execution policy makes no difference.
McAfee is not checking scripts on servers


I have tried it from the CAS/HT and MBOX server and also the jumphost.

All can telnet port 25 and send command line SMTP.

STarting to get a bit annoyed with it.
:-)

Thanks in advance.
Post #: 1

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [Microsoft Exchange 2007] >> Message Routing >> Telnet to CAS/HT Works OK But powershell and blat doesn't Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Follow TechGenix on Twitter