Solved

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

Posted on 2015-01-19
3
471 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
[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
3 Comments
 
LVL 25

Expert Comment

by:Lionel MM
ID: 40559506
Did you try looking on this site-sorry only help I can give. http://blogs.technet.com/b/heyscriptingguy/
0
 
LVL 70

Accepted Solution

by:
Qlemo earned 500 total points
ID: 40560415
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
ID: 40604369
Sorry it took so long to get back to this.  This worked fine.  Thanks
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
In this Micro Tutorial viewers will learn how to restore single file or folder from Bare Metal backup image of their system. Tutorial shows how to restore files and folders from system backup. Often it is not needed to restore entire system when onl…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

732 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