문제

I am trying to launch outlook from PS, but I get 3 areas of code that ask for me to Allow or Deny to proceed. Is there a way to bypass these warnings? My group's status on the domain is a slightly stripped down version of a Domain Admin.

$ol = New-Object -comObject Outlook.Application
$mail = $ol.CreateItem(0)  
$Mail.Recipients.Add("me@me.com")
$Mail.Subject = "PS1 Script TestMail" 
$Mail.Body = " PS Test "
$Mail.Attachments.Add("C:\scripts\test.txt")
$Mail.Send() 
도움이 되었습니까?

해결책

You either need to make sure an up-to-date anvirus product is installed (if you can control the client environment) or use Redemption or Clickyes to work around the security prompts. See http://www.outlookcode.com/article.aspx?id=52 for more details.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top