Powershell scripting and Task Scheduler Wizardry


- OS: Windows Server 2016, AD domain joined.

- Software: Intel Fortran Compiler run from the command prompt (no expertise required)

Skills required:

- Active Directory, Powershell scripting, ScheduledTasks, Windows Task Scheduler, Powershell remote sessions

Desired User Operation:

1. Multiple domain users will connect to the server using a Powershell remote session and their domain credentials.

2. The script will need to use the user’s current working directory as a variable.

If this is not possible, then the current working directory will somehow need to be passed to the script as a variable. Either one of the following methods is acceptable:

a) From the prompt, user changes path to the drive and folder where the control file exists and an output file will be generated. Automatically determine the current drive/folder path and pass it as a parameter to the script. This is preferred.

b) Alternatively, have the user pass the drive and folder path as a parameter (eg. X:\Projects\RunFolderName)

3. User will enter command (the new script) with several parameters. For example (Note: the number 4 refers to an optional numeric parameter):

NewScriptName [login to view URL] [login to view URL] 4

Current state of project:

I’ve created a scheduled task, which works if I manually execute it. The problem is that the parameters are hard-coded. Here is the task’s configuration:

- General Tab:

o Location is a sub-folder (TestSched).

o When running the task, use the following user account: (a domain user account is specified)

o Run whether user is logged on or not is selected

o Run with highest privileges is selected (may not be needed)

- Triggers Tab:

o Trigger: “When the task is created or modified”

- Actions:

o Action: Start a program

o Program/script: C:\Windows\System32\[login to view URL]

o Add arguments: /E:ON /V:ON /K “C:\user\username\[login to view URL] (see [login to view URL] contents below)

- Settings:

o If the task is already running, then the following rule applies: Queue a new instance

Contents of [login to view URL] (will be needed to flesh out the new script):

REM batch file needed to set up the compiler environment, which must be preserved forward:

call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\bin\[login to view URL]" intel64 vs2015

REM change directory to the location of the control file and output file (Note: need to either automatically use the user’s current directory, or have the user enter the working drive/folder path as a parameter):

cd /d P:\Projects\Client\ABCcorp\runfolder

REM execute my compiler software with the parameters passed from the user (Note: the number 4 is an optional, numeric parameter):

C:\mysoftware\mycompiler [login to view URL] [login to view URL] 4

Script Requirements:

Mechanism must be robust enough so that several users can stack multiple scheduled tasks into the queue.

A powershell script (preferable) or batch file needs to be written that can pass parameters to, and run a set of commands in, a Windows scheduled task. Greatly prefer to use ScheduledTasks (not the older Schtasks).

[login to view URL]

The script will:

- accept parameters from the user

- create a new task or update an existing task (eg. New-ScheduledTask or SetScheduledTask). Use a separate task for each user, if necessary

- trigger the task to run immediately, or queue the task if already running


- When task is created in task scheduler, it asks for credentials, user can be prompted for their domain user/password if needed.

- If user password is passed as a parameter, use SecureString to avoid exposing sensitive info.

- If helpful, I’m willing to set up a predefined task, or a task for each user, that can be controlled by the script.

Skills: Microsoft, Powershell, Shell Script, Software Architecture, Windows Server

See more: wince task scheduler, check task status windows task scheduler cnet, want write batch file without task scheduler, imacro task scheduler, vista task scheduler, start stop task using task scheduler vbnet, task scheduler comparison random time smooth, windows random task scheduler, powershell scripting excel users, start program scheduled time past windows task scheduler, random time task scheduler, task scheduler vista set time run program, task scheduler always stopping, task scheduler ikariam, ikariam task scheduler script

About the Employer:
( 0 reviews ) United States

Project ID: #17165788

Awarded to:


Hello, I can help with you in your project Powershell scripting and Task Scheduler Wizardry document. I have more than 5 years of experience in Microsoft, Powershell, Shell Script, Software Architecture, Windows Ser More

$250 USD in 5 days
(18 Reviews)

7 freelancers are bidding on average $164 for this job


Hi, Dear Employer! I am really interested in your project. I have enough experience in PowerShell, C/C++, C#, java programming. I am 100% sure I can satisfy your requirements perfectly. Clear Algorithm Will Encour More

$200 USD in 10 days
(79 Reviews)

Hello, Dear. How are you? I have experience in developing C++, Java, Python developer with 7+ years. I can complete your project perfectly because I have experience in that filed. I will work for you all my best. Th More

$166 USD in 10 days
(14 Reviews)

Hello, I read your whole proposal, and thanks for your post on my good experience. This is very good job for me. I have rich experience in Windwos desktop using C#,PowerShell, VB.NET, C++, java, Python, Qt5 So I thi More

$166 USD in 10 days
(18 Reviews)

Greetings!! I am an Microsoft certified professional with expertise in Windows Powershell I have done various automation projects using Powershell for the past 4+ years. I can accomplish the given task using W More

$102 USD in 3 days
(22 Reviews)
$166 USD in 8 days
(1 Review)
$100 USD in 3 days
(0 Reviews)