Wednesday, February 27, 2013

Register-ScheduledTasksEx add-on for PowershellPack

To manage the Task Scheduler service with Powershell on Windows 8/2012, you can use the new Scheduledtasks module. On Windows Vista/7/2008/2008 R2 you have to download the PowershellPack (also included in Windows 7 Reskit) and install the taskscheduler module.

But there is one thing missing in the taskscheduler module, when you want to create a new task with the Register-ScheduledTasks : you can’t specified in witch folder you want it. So I’ve created a new cmdlet (Register-ScheduledTasksEx) that allow you to specified to folder to use. To install this new cmdlet (kind of a add-on) with the taskscheduler module, just follow these 2 steps :

Step 1 : Create the file Register-ScheduledTasksEx.ps1

Create a new file named Register-ScheduledTasksEx.ps1 in the directory where the taskscheduler module is installed (generally %USERPROFILE%\Documents\WindowsPowerShell\Modules) and paste the following code in it.

function Register-ScheduledTaskEx 
        Registers a scheduled task.
        Registers a scheduled task.
        Modified to support Folders (path)
    # The name of the scheduled task to register

    # The path of the scheduled task to register
    # The Scheduled Task to Register
    # The name of the computer to connect to.
    # The credential used to connect
    begin {
        Set-StrictMode -Off
    process {
        if ($task.Definition) { $Task = $task.Definition } 
        foreach ($c in $computerName) {
            $scheduler = Connect-ToTaskScheduler -ComputerName $c -Credential $Credential            
            if ($scheduler -and $scheduler.Connected) {
                $folder = $scheduler.GetFolder($path)
                if ($Credential) {
                } else {

Step 2 : Modify TaskScheduler.psm1 file

Add the following line to the TaskScheduler.psm1 file (In the TaskScheduler module directory).

. $psScriptRoot\Register-ScheduledTaskEx.ps1


Here’s how to use the new cmdlet :

import-module TaskScheduler
$ScheduledTask = New-Task
$ScheduledTask | add-TaskAction -path "Notepad.exe" -Arguments "" -WorkingDirectory ""| out-null
# Note : The folder "\MyCustomFolder" must already  exist in the TaskScheduler
$ScheduledTask | Register-ScheduledTaskEx -Name "MyCustomScheduledTask" -path "\MyCustomFolder" -ComputerName Localhost | out-null

Source :

Advanced Log Parser

Robert McMurray has started an excellent series of posts about Log Parser.

The first 6 posts in his series are available :

Source :

Tuesday, February 12, 2013

Galaxy S IV To Be Unveiled March 15


The Galaxy S IV is going to be announced March 15th with the device being available in Europe and Asia beginning in April. The U.S., Australia and Africa will be able to get their hands on the Galaxy device in the May / June time frame.
Source : Life On My Mobile