Solved

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

Posted on 2015-01-19
3
414 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: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 69

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

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