[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Starting Outlook from Powershell

Posted on 2012-03-22
3
Medium Priority
?
1,294 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Let's recap what we learned from yesterday's Skyport Systems webinar.
Are you looking for the options available for exporting EDB files to PST? You may be confused as they are different in different Exchange versions. Here, I will discuss some options available.
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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

650 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