?
Solved

Starting Outlook from Powershell

Posted on 2012-03-22
3
Medium Priority
?
1,086 Views
Last Modified: 2012-03-26
I have a server 2008 powershell script to start outlook:

# PowerShell script to start outlook
$Result = get-process -EA “SilentlyContinue” outlook | where {$_.ProcessName -eq “OUTLOOK”}
if (-not $Result) {& 'C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE'}

This works fine if I'm logged in as administrator and manually run the script or run it via a batch file.

I have set it up as a scheduled task and in order to do that have specified that it be run as ADDomain\net since ADDomain\net is the user with privilege to run scheduled tasks.  When run this way, the outlook process starts, but the application window does not come up.

Is there a way I can correct this?

Thanks.
0
Comment
Question by:dspace
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
markdmac earned 2000 total points
ID: 37755792
No, this is a security feature that was introduced back in SP1 of Windows 2000.  You can't start a process with alternate credentials and have it be interactive with the user session.  If you were logged on as ADDOMAIN\NET then you would see it.
0
 
LVL 25

Expert Comment

by:DBAduck - Ben Miller
ID: 37761990
You should look here:
http://blogs.msdn.com/b/powershell/archive/2009/04/23/v2-quick-tip-starting-a-new-elevated-process-from-a-powershell-script.aspx

In PowerShell v2 you can start a process with Elevated permissions.  If you don't have Administrative permissions on the machine with your user, then you need to run it as someone elses account like you have a task.

So look at this post and that should help you get around not being able to start it.
0
 
LVL 15

Expert Comment

by:markdmac
ID: 37762131
I would just follow up with running elevated is not the same as running with alternate credentials as requested.
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here's a look at newsworthy articles and community happenings during the last month.
Let's recap what we learned from yesterday's Skyport Systems webinar.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month14 days, 10 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question