Solved

Use PowerShell to configure Scheduled Task to include 'Configure For' and Description

Posted on 2015-01-19
3
367 Views
Last Modified: 2015-02-11
I have created a Scheduled Task with Powershell 4.0.  I am utilizing a gMSA account to run the Scheduled Task.  The Scheduled Task runs fine.  However, I'd like to add a description and possibly change the 'Configure for' parameter from 'Windows 7, Windows Server 2008 R2' to 'Windows Server 2012 R2'.  Since I'm using a gMSA I cannot do this from the the Task Scheduler app, it must be done via powershell.  After much searching the internet I haven't found a solution for either of these.  The servers are vm's running 2012 R2.  Is there a way of doing this either when creating the scheduled task or after the Scheduled Task has been created?
0
Comment
Question by:BigmacMc
3 Comments
 
LVL 24

Expert Comment

by:lionelmm
Comment Utility
Did you try looking on this site-sorry only help I can give. http://blogs.technet.com/b/heyscriptingguy/
0
 
LVL 68

Accepted Solution

by:
Qlemo earned 500 total points
Comment Utility
I assume you are using the new cmdlets only working with PS4 and W8+.
Then you have to create a configuration setting with
$s = New-ScheduledTaskSettingsSet -Compatibility Win8

Open in new window

and feed that in e.g.
New-ScheduledTask ... -Settings $s -Description 'Blabla'

Open in new window

0
 

Author Closing Comment

by:BigmacMc
Comment Utility
Sorry it took so long to get back to this.  This worked fine.  Thanks
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
A procedure for exporting installed hotfix details of remote computers using powershell
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…

762 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now