header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

Scheduling Powershell in Vista/Windows 2008
Last Post 10 Jul 2008 04:25 AM by glnsize. 4 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
SoCalDaveLUser is Offline
New Member
New Member
Posts:19
Avatar

--
09 Jul 2008 02:17 PM  

This post kind of crosses different topics, but its quite general in nature...

 

Using Windows Server 2008 I'm trying to schedule a batch file to run which will launch the Microsoft Exchange console and run the specific powershell script I have.  More information from Microsoft about how to do that can be found here:

http://technet.microsoft.com/en-us/library/bb123798(EXCHG.80).aspx

 

What I'm having trouble with is scheduling a job to be run as a specific user (who has the necessary rights) when they're not logged onto the server.  By the way, this supposedly is the same task scheduler as in Vista too.

I know this is more of a Windows specific question, but if anyone knows the proper way to accomplish this, it'll certainly be helpful to this community too to schedule and run their Powershell scripts.

 

Thanks,

 

P.S. - I know that SCOM is supposed to be able to handle scheduling and running of powershell scripts, but it doesn't appear to be "ready for prime time" yet as far as Exchange is concerned.

^^^^^^^^^^^^^^^^^^^^
"Sometimes I feel like I'm full of I.T."
Twitter = SoCalDaveL
halr9000User is Offline
PowerShell MVP, Site Admin
Basic Member
Basic Member
Posts:335
Avatar

--
09 Jul 2008 10:40 PM  
Any reason you are wanting to use a .bat launcher? First recommendation would be to do it 100% in posh.

Aside from that, I haven't played with the new scheduler much. Hopefully someone else has who can comment.
Community Director, PowerShellCommunity.org
Co-host, PowerScripting Podcast
Author, TechProsaic
bsonposhUser is Offline
Basic Member
Basic Member
Posts:393
Avatar

--
10 Jul 2008 01:48 AM  
Im with hal... just use
Powershell.exe -noprofile -command [script removed]
Brandon Shell
----------------
Microsoft Powershell MVP
https://mvp.support.microsoft.com/profile/Brandon
Blog: http://www.bsonposh.com
bsonposhUser is Offline
Basic Member
Basic Member
Posts:393
Avatar

--
10 Jul 2008 01:49 AM  
btw... you can just add the Exchange Snapins to any powershell session

The easiest wasy is to add them using add-pssnapin
Brandon Shell
----------------
Microsoft Powershell MVP
https://mvp.support.microsoft.com/profile/Brandon
Blog: http://www.bsonposh.com
glnsizeUser is Online
Basic Member
Basic Member
Posts:101

--
10 Jul 2008 04:25 AM  

 

Make sure that you check "Run whether user is logged on or not" and "Run with highest Privileges", The latter is only needed if you’re doing something that would normally require right click -> Run as Administrator. 

I'm not positive I know what your problem is/was... So I threw together a quick screencast highlighting how to do it.

http://get-admin.com/blog/?p=4

Minus the actual script I use. that's how I'm currently backing up my Exchange Servers.

~Glenn Sizemore

 

You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer