Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2015-01-19
3
Medium Priority
?
549 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 71

Accepted Solution

by:
Qlemo earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The reason that corporations and businesses use Windows servers is because it supports custom modifications to adapt to the business and what it needs. Most individual users won’t need such powerful options. Here I’ll explain how you can enable Wind…
OfficeMate Freezes on login or does not load after login credentials are input.
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 configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

688 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