Deletion of KM scheduler Task

Hello All,
I have a a scheduled task in SA>SC>KM>CM>Global services -->Scheduler Task --> <My custom scheduler>.
Now I want to delete the scheduler .
I went through the following forum links
http://forums.sdn.sap.com/thread.jspa?threadID=486614&tstart=7950
And
https://forums.sdn.sap.com/thread.jspa?threadID=57900
When I select my <custom scheduler task> and  click on "delete" . It say "No <No custom scheduler task > available yet in configuration" .
Where exactly is the scheduler task configuration ?
Kind inputs please.
Regards,
Ronniee.

Hi Ronniee,
To remove the scheduler task completly use the ConfigUninstaller component and remove the config file of your project.
http://<host>:<port>/irj/servlet/prt/portal/prtroot/com.sap.portal.runtime.config.component.ConfigUninstaller
Thanks
Prashant

Similar Messages

  • 2008 R2 GPO How to delete the AppleSoftwareUpdate Scheduled Task on Windows 7 clients?

    How do you configure a GPO in AD 2008 R2 SP1 that will delete the AppleSoftwareUpdater Scheduled Task. I can't successfully create one. It gives errors wanting a name and an action, even though I have named it (several variations tried). The scheduled task
    is in the \Apple\AppleSoftwareUpdater folder in Task Scheduler on the local machines. I can't find any good information at all for deleting scheduled tasks. I have read the MS documenation and it is very vague.
    If you know how to configure a GPO in AD 2008 R2 SP1 that will delete the AppleSoftwareUpdate scheduled task on client computers running Windows 7, I would really appreciate a quick answer. Our new computers are being deployed and the image creator
    did not configure this setting.
    I know there are several methods for accomplishing the same thing but I don't want to do it that way unless I have to. Please don't post unless you know.

    Howdie!
    On 29.03.2011 19:40, jcdodsr wrote:
    > How do you configure a GPO in AD 2008 R2 SP1 that will delete the
    > AppleSoftwareUpdater Scheduled Task. I can't successfully create one. It
    > gives errors wanting a name and an action, even though I have named it
    > (several variations tried). The scheduled task is in the
    > \Apple\AppleSoftwareUpdater folder in Task Scheduler on the local
    > machines. I can't find any good information at all for deleting
    > scheduled tasks. I have read the MS documenation and it is very vague.
    So I assume you have tried naming the Scheduled Task just the same way
    the AppleSoftwareUpdater is named on the client and chose "Remove" as an
    Action?
    If you have and it doesn't work, can you turn on Preference logging?
    Cheers,
    Florian
    The views and opinions expressed in my postings do NOT correlate with the ones of my friends, family or my employer.

  • Schedule Task - Windows 2008 R2 - User Session

    I am migratiing the schedule task from windows 2003 to windows 2008 and find some of behaviour change on handling user session by Task Scheduler.
    I have a simple batch to call "net use" command to map a network drive for copying file to remote server. And I have scheduled 3 similar tasks and run as same user (e.g. testuser)
    In windows 2003 enviornment, the mapped network drive resource will not be accessed by another schedule task. In windows 2008 R2, howerver, the network drive mapped in one of schedule task can be reached by another task. Does anyone have
    idea on this behaviour change?
    Here are the testing script
    Test Script 1
    NET USE >> D:\TEST1.LOG
    NET USE Z: \\127.0.0.1\Share /PERSISTENT:NO >> D:\TEST1.LOG
    ping 127.0.0.1 -n 100
    NET USE Z: /DELETE
    Test Script 2
    NET USE >> D:\TEST2.LOG
    NET USE Z: \\127.0.0.1\Share /PERSISTENT:NO >> D:\TEST1.LOG
    ping 127.0.0.1 -n 100
    NET USE Z: /DELETE
    Test Script 3
    NET USE >> D:\TEST3.LOG
    NET USE Z: \\127.0.0.1\Share /PERSISTENT:NO >> D:\TEST3.LOG
    ping 127.0.0.1 -n 100
    NET USE Z: /DELETE
    Output in Windows 2003
    Test1.LOG
    New connections will not be remembered.
    There are no entries in the list.
    The command completed successfully.
    z: was deleted successfully.
    Test2.LOG
    New connections will not be remembered.
    There are no entries in the list.
    The command completed successfully.
    z: was deleted successfully.
    Test3.LOG
    New connections will not be remembered.
    There are no entries in the list.
    The command completed successfully.
    z: was deleted successfully.
    Output in Windows 2008
    Test1.LOG
    New connections will not be remembered.
    There are no entries in the list.
    The command completed successfully.
    z: was deleted successfully.
    Test2.LOG
    New connections will not be remembered.
    Status       Local     Remote                    Network
    OK           Z:       
    \\127.0.0.1\Share          Microsoft Windows Network
    The command completed successfully.
    System error 85 has occurred.
    The local device name is already in use.
    The network connection could not be found.
    More help is available by typing NET HELPMSG 2250.
    Test3.LOG
    New connections will not be remembered.
    Status       Local     Remote                    Network
    OK           Z:       
    \\127.0.0.1\Share          Microsoft Windows Network
    The command completed successfully.
    System error 85 has occurred.
    The local device name is already in use.
    The network connection could not be found.
    More help is available by typing NET HELPMSG 2250.

    Sorry for confusing, I have udpated the script for this testing
    =====================================================
    Script for Schedule Task 1 - to map a network drive and issue a ping command to "sleep"
    Echo %date% %time% list drive on schedule task 1
    NET USE 
    Echo %date% %time% map drive on schedule task 1
    NET USE Z: \\127.0.0.1\Share /PERSISTENT:NO
    ping 127.0.0.1 -n 100 > NUL
    Echo %date% %time% remove drive on schedule task 1
    NET USE Z: /DELETE
    Script for Schedule Task 2 - to list out any network drive are mapped.
    Echo %date% %time% list drive on schedule task 2
    NET USE 
    ========================================================================
    The schedule task 2 are triggered while the schedule task 1 are running, In the windows 2003, the schedule task 2 could not list out any mapped drive. In the windows 2008, however, the schedule task 2
    can list the network drive mapped by schedule task 1. The question is if there are any changes between windows 2003 and 2008, hope it can clarify.
    Ouput on windows 2003
    Schedule task1
    D:\>Echo Wed 02/06/2013 18:31:52.93 list drive on schedule task 1
    Wed 02/06/2013 18:31:52.93 list drive on schedule task 1
    D:\>NET USE
    New connections will not be remembered.
    There are no entries in the list.
    D:\>Echo Wed 02/06/2013 18:31:52.98 map drive on schedule task 1
    Wed 02/06/2013 18:31:52.98 map drive on schedule task 1
    D:\>NET USE Z: \\127.0.0.1\Share /PERSISTENT:NO
    The command completed successfully.
    D:\>ping 127.0.0.1 -n 100 1>NUL
    D:\>Echo Wed 02/06/2013 18:33:32.07 remove drive on schedule task 1
    Wed 02/06/2013 18:33:32.07 remove drive on schedule task 1
    D:\>NET USE Z: /DELETE
    Z: was deleted successfully.
    Schedule Task 2
    d:\>Echo Wed 02/06/2013 18:32:22.54 list drive on schedule task 2
    Wed 02/06/2013 18:32:22.54 list drive on schedule task 2
    d:\>NET USE
    New connections will not be remembered.
    There are no entries in the list.
    Output on windows 2008
     Schedule task1
    C:\Windows\system32>Echo Wed 02/06/2013 18:17:52.13 list drive on schedule task 1
    Wed 02/06/2013 18:17:52.13 list drive on schedule task 1
    C:\Windows\system32>NET USE  
    New connections will not be remembered.
    There are no entries in the list.
    C:\Windows\system32>Echo Wed 02/06/2013 18:17:52.16 map drive on schedule task 1
    Wed 02/06/2013 18:17:52.16 map drive on schedule task 1
    C:\Windows\system32>NET USE Z: \\127.0.0.1\Share /PERSISTENT:NO 
    The command completed successfully.
    C:\Windows\system32>ping 127.0.0.1 -n 100 
    1>NUL
    C:\Windows\system32>Echo Wed 02/06/2013 18:19:32.59 remove drive on schedule task 1
    Wed 02/06/2013 18:19:32.59 remove drive on schedule task 1
    C:\Windows\system32>NET USE Z: /DELETE
    Z: was deleted successfully.
    Schedule task2
    C:\Windows\system32>Echo Wed 02/06/2013 18:18:07.69 list drive on schedule task 2
    Wed 02/06/2013 18:18:07.69 list drive on schedule task 2
    C:\Windows\system32>NET USE  
    New connections will not be remembered.
    Status       Local     Remote                    Network
    OK           Z:        \\127.0.0.1\Share        
    Microsoft Windows Network
    The command completed successfully.

  • Windows 2008 Server SFTP Scheduled Tasks fails to execute sftp commands

    I have a scheduled task that pulls in Human Resources data using sftp public / private key combination.  It was associated with user who has recently left the company and their account has been disabled. Everything I've read
    so far leads me to believe that I need to establish the sftp connection and create a registry entry for another user...   I don't want this application to be dependent on any particular user.   I've stored the key set on a share that is
    open to any system administrator on the server and created a batch job similar to:
    Del oldFile.txt
    "psftp.exe <user>@<server> -i <PrivateKeyLocation> -b <FtpComands>". 
    The old file gets deleted fine via scheduled task or manual, but the new file only gets pulled when running it directly from my account. 
    Any suggestions would be greatly appreciated.

    The list of ftp commands that you are passing in to psftp.exe may need user specific resources (for example, a mapped drive). But it's difficult to say though without looking at what the psftp commands do. If the available commands for psftp.exe
    are not flexible enough, you might want to look at other solutions like Sysax FTP Automation.

  • [Forum FAQ] Fixing scheduled task Next Run Time displaying as expired time plus days to delete

    Symptom:
    We used Task Scheduler to create a scheduled task. For example, we configured a daily task, starting from 3 AM 9/3/2014, recurring the task every 1 day, and set the expiration time as 3 AM 9/3/2015 (See Figure 1). Under
    Settings tab, we checked If the task is not scheduled to run again, delete if after:
    option, and set the value as 30 days (See Figure 2).
    However, in the Task Scheduler Library snap-in, we saw that the Next Run Time of the task is 3AM 10/3/2015, which equals expiration date plus days to delete (See Figure 3), but the right value should be 3 AM 9/2/2014 because the task has never been run.
    Figure 1
    Figure 2
    Figure 3
    Cause:
    This is a Task Scheduler interface displaying issue. Although the next run time that is displayed in the Task Schedule is incorrect, the trigger will be fired correctly.
    Solution:
    We can install the hotfix in the following KB article to fix the displaying issue, though the symptom in the article is different.
    An incorrect value for Next Run Time is displayed when you specify multiple triggers to schedule a task in Windows Vista, Windows 7, Windows Server 2008 or Windows Server 2008 R2
    http://support.microsoft.com/kb/2495489
    After installing the hotfix, we need to restart computers to make it take effect.
    In this example, after installing the hotfix and restarting the computer, we see that the next run time of the task is displayed correctly in Task Scheduler (Figure 4).
    Figure 4

    I am not running out of space, but I do have the same problem.  Every so often TM does a backup which is about 60 GB bigger than expected.   The  extra is always a new backup of /System /Applications /usr etc. - that is the 'system files'.
    The key thing is, as you have noticed:
    Examining the content of the latest backup, the one that did not fail, shows that some system directories, /Applications, /usr, and /bin are missing
    As a consequence the next backup is, in my case, 60 GB bigger because it includes all the system files.
    It is as if 'systemFilesExcluded' was turned on for the previous backup (the one that 'did not fail').  But I have looked in the .exclusions.plist for this backup and it is exactly the same as for other backups and does include:
            <key>systemFilesExcluded</key>
            <false/>
    It seems that TM is treating this as if <true/>.
    Like you, I have done a disk verify and it finds no errors.
    I think this must be a bug.  I have had this on four occassions since upgrading to Mountain Lion.  And it is doing a large one right now - I have caught it in the act!

  • CF9 Deleted Scheduled Tasks Still running

    I have several scheduled tasks that were deleted via the admin but they are still running.  Don't show up in the admin, but still run.
    I have tried to programmatically delete them also.  Have looked in neo-cron.xml and they dont exist in there either.
    Any ideas?

    Update to this.
    Not only are deleted items running, but active items are running twice.

  • How to create scheduled task to delete failure/open tasks

    hi.
    I have a question that I hope someone can give me some input to.
    we have an OIM 9.1.0.1 installation and have a situation where we have around 14 500 open tasks. we read somewhere that this might cause performance issues. we have also found a HOWTO on Oracle Metalink that explains how to delete these tasks. i states that one should:
    - Create a scheduled task which uses the API:
    Thor.API.Operations.tcProvisioningOperationsIntf.setTasksCompletedManually
    ...and that's it. it doesn say anything else. doing this by creating a scheduled task in OIM Admin Console will not work since we don't have this Java class. is there anyone who has sort a similar problem? any help/tips/guidelines are appreciated.
    P.S.: The Oracle Metalink HOWTO:
    Link: [https://metalink.oracle.com/CSP/ui/flash.html#tab=KBHome(page=KBHome&id=()),(page=KBNavigator&id=(from=BOOKMARK&bmDocType=HOWTO&bmDocDsrc=KB&bmDocTitle=How%20to%20%3Cb%3EDelete%3C/b%3E%20Failure%20or%20Cancelled%20%3Cb%3ETasks%3C/b%3E%20in%20%3Cb%3EOpen%3C/b%3E%20%3Cb%3ETasks%3C/b%3E&bmDocID=731282.1&viewingMode=1143))]
    Edited by: user10378227 on Oct 27, 2009 1:07 AM

    Use this link:
    How to create a new schedule task from java code
    http://download.oracle.com/docs/cd/E10391_01/doc.910/e10361/tasks_archival.htm#sthref85

  • Need to delete Scheduled Tasks automatically using a script or schtasks.exe, but it is NOT allowing it - PLEASE HELP!

    I have tried and tried to get this to work in a script, but it simply is NOT doing what I need. I am simply trying to run
    schtasks /delete /tn <task name> /f
    but when I do, I receive the following ANNOYING ERROR:
    ERROR: The system cannot find the file specified.
    I am looking right at the task in the Task Scheduler utility, so I know it EXIST!!
    Then, when I run a "schtasks /query" I see that the task I want to delete has the following information:
    INFO: There are no scheduled tasks presently available at your access level.
    I can delete the tasks just fine in the Task Scheduler console, but I NEED this to be automated so these tasks can be deleted on multiple systems. 
    Can someone PLEASE help me out with this. The systems I need this to run on our Windows 7 SP1. 
    Thank you

    Listen up dude, I am not a home user I am a professional and this same issue is spread all over the internet with most professionals scratching their head not understanding why it is not working.
    However, I found the answer here:
    http://www.jonathankeller.com/2012/02/schtasks-query-tn-tasks-over-network.html
    So you see "dude" even your link shows that you were not a professional as any professional would have read the help first.  Your post give no information as to what you are doing and assumes that a system utility is a script which nearly
    all professionals agree that system utilities are not scripts.
    From the question and the very arrogant response it is clear you are a home user with no formal technical training....or are you theoffice manager who was stuck with doing these things for your boss?
    Your "handle" is also very unprofessional and telling about your "I AM Sir Ask A lot".  Try studying the technical information about Windows.  Learn to start with the system help.  It will save you a lot of blood pressure
    excursions.
    Also note that the help is explicit.  Use the folder path syntax returned from /Query and not the one you see in the GUI.  Again - learning to use help first would save a lot of headaches.
    Stick with it kid.  When you get to by half my age you might be able to call yourself a "professional".  Until then - hit the books.
    ¯\_(ツ)_/¯

  • How can I delete local schedule tasks, if they do not show up in the left ARD pain

    In ARD you can schedule task on the local machine.
    Usually you can see the scheduled task in the left pain of the main window.
    I deleated some schedules tasks, but the tasks continue excute every morning.
    Is the a way to find these invisable scheduled tasks and remove them.
    I would be happy to know if a data base needs to be edited or a file deleated
    Cheers
    Gifford

    what dose the invisible task do?

  • Opening Excel Workbook Fails when run from Scheduled Task on Windows Server 2008 Rw

    Hi,
    I have a little vbs script that instantiates the Excel.Application object and then opens a work book to perform some tasks on it. The script runs fine when run from the command line. When I attempt to run it as a scheduled task (it is supposed to update
    data that is pulled from a SQL Server at regular intervals), it fails with the following error:
    Microsoft Office Excel cannot access the file 'c:\test\SampleWorkbook.xlsm'. There are several possible reasons: .....
    The file does exist. The path reported in the error is correct. The account under which the task is running is the same account I use to run it from the command line. User Account Control is not enabled, and the task is set up to run with highest privileges.
    When I run the same script through the Task Scheduler from a Windows Server 2003 machine, it works without issue.
    I was just wondering if somebody on this forum has run into a similar issue in connection with Windows Server 2008 R2 and figured out what the magic trick is to make it work. I'm sure it is rights related, but I haven't quite figured out what which rights
    are missing.
    Thanks in advance for any advice you may have.

    This is truly killing me ... trying to get it working on Windows Server 2012 without success.
    I desperately need to automate running Excel macros in a "headless" environment, that is non-interactive, non-GUI, etc.
    I can get it to work using Excel.Application COM, either via VBScript or Powershell, successfully on many other Windows systems  in our environment - Windows Server 2008 R2, Windows 7 (32-bit), etc.,  -BUT-
    The two servers we built out for running our automation process are Windows Server 2012 (SE) - and it just refuses to run on the 2012 servers - it gives the messages below from VBScript and PowerShell, respectively- 
    I have tried uninstalling and re-installing several different versions of Microsoft Excel (2007 Standard, 2010 Standard, 2010 Professional Plus, 32-bit vs. 64-bit, etc.), but it makes no difference.
    Would be extremely grateful if any one out there has had any success in running Excel automation on Server 2012 in a non-interactive environment that they could share.
    ( I have tried adding the "%windir%\syswow64\config\systemprofile\desktop"
    folder, which did fix the issue for me when testing on Windows Server 2008 R2, but sadly did not resolve it on Windows Server 2012 )
    [VBScript error msg]
    Z:\TestExcelMacro.vbs(35, 1) Microsoft Office Excel: Microsoft Office Excel cannot
    access the file 'Z:\TestExcelMacro.xlsm'. There are several possible reasons:
    • The file name or path does not exist.
    • The file is being used by another program.
    • The workbook you are trying to save has the same name as a currently open work
    [Powershell error msg]
    Exception calling "Add" with "0" argument(s): "Microsoft Office Excel cannot open or save any more documents because th
    ere is not enough available memory or disk space.
     To make more memory available, close workbooks or programs you no longer need.
     To free disk space, delete files you no longer need from the disk you are saving to."
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : ComMethodTargetInvocation
    You cannot call a method on a null-valued expression.
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull

  • Exchange 2010 GAL Export script working from EMS but not as a scheduled task

    I have been asked to get a script together to export the GAL on an Exchange 2010 server and then email it to a manager. I have been playing it with days, and have pruned it to the very minimum to at least try and get it working before improving it. At the
    moment I have the text as below:
    Del c:\GALexport.csv
    Get-Recipient -ResultSize unlimited | where {$_.HiddenFromAddressListsEnabled -eq $false} | Select DisplayName,PrimarySMTPAddress,sAMAccountName,alias | Export-Csv "c:\GALexport.csv"
    This works just fine in Exchange Management Shell and deletes the previous report before creating a new one. However, when I set it up as a scheulded task, it does nothing.
    The task is set up as follows:
    Action - Start a Program
    Program/ Script C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe
    Add arguments -version 2.0 -NonInteractive -WindowStyle Hidden -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; d:\Scripts\GalExportReport.ps1"
    This is set to run under my administrator account with the highest privileges and I have the logon as batch right.
    Unfortunately, when I run it as a scheduled task, nothing happens. The last run result is (0x0) and in the history it says 'task completed', but no report is produced. Can anyone advise please?

    Does it delete the c:\GALexport.csv file? If not, then its not even executing the ps1 script...
    - Open cmd prompt and run below command to confirm that there isn't any typo or any other small error...
    C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe -version
    2.0 -NonInteractive -WindowStyle Hidden -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; d:\Scripts\GalExportReport.ps1"
    - If above works then something wrong with task scheduler configuration...
    Blog |
    Get Your Exchange Powershell Tip of the Day from here

  • Windows Server 2008 R2 GPO schedule task for copying folders

    Dear spicers,I have spend many hours trying to get my gpo working to sync a fewshared networkfolders with office templates to users default office 2010 template location.I created a user conf gpo: preferences\control panel settings\schedule tasks\Action: UpdateName: Mirror FoldersRun: \\dfsname\netlogon\scrips\RobocopyScript.cmdMarked: Enable (scedule task runs at specific time)schedule taks: At system startup Starttime: 8:00:00Advanced: everything unmarkedTab settings: everything unmarkedTab common: Marked Run in logged-on users....Script: robocopy "\\dfslocation\public\Prog\Documentsjablonen\Office" "C:\users\%username%\AppData\Roaming\Microsoft\Sjablonen" /MIR /R:10 /W:30 Is there anyone who is able to help me out please. I have read many topics on the internet etc. When I run the script local it is working.Thanks in advance.Kind...
    This topic first appeared in the Spiceworks Community

    Thank you for your help with this but I was able to get it resolved using these steps.
    Here is the fix that worked for me.
    Start > Run > regedit
    Navigate to HKLM\SOFTWARE\MICROSOFT\RPC\INTERNET 
    Export this key to back it up first, then delete the whole Internet key (and it's sub-keys). 
    Reboot your system
    Task Scheduler should now work.
     https://social.technet.microsoft.com/Forums/windows/en-US/0c438376-1486-4ae4-9847-2de7a8767f27/task-scheduler-service-has-encountered-rpc-initialization-error-in?forum=itprovistasp

  • Alternatives to PowerShell automation of Excel (Scheduled Task) in a Windows Server 2012 R2 world

    I have a handful of PowerShell scripts that ran as Scheduled Tasks on an old Windows 2008 SP2 server, which output reports as Excel workbooks with multiple worksheets, via a COM object. After migrating these scripts to a new Windows 2012 R2 server,
    these scripts no longer function. The Server 2008 system was running Office 2007, and the new Server 2012 R2 server has Office 2013 installed.
    What is everyone using on their Server 2012 R2 systems to automate generation of multi-sheet reports in Excel via PowerShell and Scheduled Tasks?
    I know that Microsoft has said that automating Office applications server-side in non-interactive mode, but it has worked in the past, until now. (https://support.microsoft.com/kb/257757)
    I've tried the OpenXML PowerTools for PowerShell (https://powertools.codeplex.com/), but Export-OpenXMLSpreadsheet will only export a single worksheet, and they don't support adding worksheets to existing files
    (am I missing something?). I understand the OpenXML PowerTools can be extended in C#, but I don't C#. The PowerShell cmdlets were released in Jan 2012, but don't look to have been updated since then (updates have been the core C# code).
    I've seen recommendations to add C:\Windows\(System32 or SysWOW64)\config\systemprofile\Desktop, but this hasn't worked on Server 2012.
    Has anyone been able to get Excel 2013 to cooperate on Server 2012 R2, or come up with a suitable alternative? I'd rather not start running these scripts from my workstation.
    EDIT:
    I'm not necessarily looking for an Excel answer, since there are OpenXML ways of doing things now without the Excel application.
    Here are some of the errors I'm getting when approaching this from different directions. When I use:
    $excel = New-Object -comobject Excel.Application$workbook = $excel.Workbooks.Add()
    Results in error:
    Exception calling "Add" with "0" argument(s): "Microsoft Excel cannot open or
    save any more documents because there is not enough available memory or disk
    space.
    • To make more memory available, close workbooks or programs you no longer
    need.
    • To free disk space, delete files you no longer need from the disk you are
    saving to."
    At C:\path\to\script.ps1:21 char:2
    + $workbook = $excel.Workbooks.Add()
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ComMethodTargetInvocation
    The server is definitely not lacking for resources.
    I can copy a blank XLSX file and use .Open($xlFile) instead of .Add(), but then when I go to open a CSV file to copy/paste the content to a worksheet, I get this one:
    Exception calling "Open" with "1" argument(s): "The server threw an exception.
    (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))"
    At C:\path\to\script.ps1:65 char:2
    + $tempcsv = $excel.Workbooks.Open($CSVFile)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ComMethodTargetInvocation
    Things that I've tried so far, with no success:
    I created C:\Windows\System32\config\systemprofile\Desktop and C:\Windows\SysWOW64\config\systemprofile\Desktop as suggested here:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/0751119d-84d5-4a77-8240-1c4802f97375/powershell-scheduled-tasks-wont-start-excel?forum=winserverpowershell
    Add Local Launch and Local Activation permissions to the Microsoft Excel Application DCOM Config, Grant "Read & Execute, List folder contents, Read" permissions on the \config\systemprofile\Desktop folder. Grant "Modify, Read & Execute,
    List Folder Content, Read, Write" permissions for the account on the following folders:
    \config\systemprofile\AppData\Roaming\Microsoft
    \config\systemprofile\AppData\Local\Microsoft
    as suggested here:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/aede572b-4c1f-4729-bc9d-899fed5fad02/run-powershell-script-as-scheduled-task-that-uses-excel-com-object?forum=winserverpowershell
    @ jrv - I will try posting a similar question in the Excel 2013 forum, but since I'm looking for a scripting solution to produce an OpenXML spreadsheet, and not something that necessarily uses the Excel application (though such a solution would not be turned
    away), I thought this the more appropriate venue.
    (to reiterate from OP) I have seen and acknowledge Microsoft's statements regarding the unsupported nature of automating Office applications in non-interactive environments, but the truth of the matter is, supported or not, it worked in the past (Server
    2008), it's what I inherited from my predecessor, and I know I'm not the only one who has been using Excel in this way. I'm only asking fellow scripters, some of whom must also be using Excel in this "unsupported" fashion, how they are automating
    creation of their spreadsheet reports after moving to Server 2012. A different system modification to make the Excel comObject continue working as before? Direct manipulation of the OpenXML document? Other solutions that may or may not require launching the
    Excel application?

    #1 - Ask in Excel 2013 forum.
    #2 - Microsoft has repeatedlynoted that this is NOT a supported configuration for Office products.
    #3 - What errors are you getting?
    #4 - What have you done to debug this:
    #5 - No one can be of much help unless you post a very simple example of how this fails.
    ¯\_(ツ)_/¯

  • How can I setup a scheduled task to run a Powershell Script delivered as a Group Policy Preference

    I have a Powershell script I want to run only once when a user logs onto their system. This script would move all the PST files from the Local drive and the Home drive to a folder location within the users profile. I wanted to run this as a Windows 7 Scheduled Task using Group Policy Preferences. How can I get this to happen short of a logon script? I have updated all the machines to WMF 4.0 so could I use a Scheduled Job instead? I wanted to run the script as the logon user but elevated.#Start Outlook and Disconnect attached PST files.
    $Outlook = New-Object -ComObject Outlook.Application
    $namespace = $outlook.getnamespace("MAPI")
    $folder = $namespace.GetDefaultFolder("olFolderInbox")
    $explorer = $folder.GetExplorer()
    $explorer.Display()
    $myArray= @()
    $outlook.Session.Stores | where{ ($_.FilePath -like'*.PST') } | foreach{[array]$myArray+= $_.FilePath}
    for
    ($x=0;$x-le$myArray.length-1;$x++)
    $PSTPath= $myArray[$x]
    $PST= $namespace.Stores | ?{$_.FilePath -like$PSTPath}
    $PSTRoot= $PST.GetRootFolder() #Get Root Folder name of PST
    $PSTFolder= $Namespace.Folders.Item($PSTRoot.Name) #Bind to PST for disconnection
    $Namespace.GetType().InvokeMember('RemoveStore',[System.Reflection.BindingFlags]::InvokeMethod,$null,$Namespace,($PSTFolder)) #Disconnect .PST
    #Move All PST files to the default location while deleting the PST files from their original location.
    $SourceList = ("$env:SystemDrive", "$env:HOMEDRIVE")
    $Destination = ("$env:USERPROFILE\MyOutlookFiles")
    (Get-ChildItem -Path $SourceList -Recurse -Filter *.PST) | Move-Item -Destination $Destination
    #Attach all PST files from the default location.
    Add-type -assembly "Microsoft.Office.Interop.Outlook" | out-null
    $outlook = new-object -comobject outlook.application
    $namespace = $outlook.GetNameSpace("MAPI")
    dir “$env:USERPROFILE\MyOutlookFiles\*.pst” | % { $namespace.AddStore($_.FullName) }

    Mike,
    I do not understand what appears to be a regular expression above. I did add the PowerShell script to the HKCU RunOnce Key as suggested.
    Windows Registry Editor Version 5.00
    C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -noprofile -sta -WindowStyle Hidden -ExecutionPolicy RemoteSigned -File "C:\scripts\Windows PowerShell\Move-PST.ps1"
     I'm delivering this using Group Policy Preferences. It seems to fail or time out when run because the behavior is different if I run the script from within the PowerShell IDE. I added the parameters to the script and will try it again in the morning.

  • Security Violation Error while running schedule task from OIM.

    Hi All,
    I am getting this error while running a custom java schedule task from OIM:
    *Thor.API.Exceptions.tcAPIException [EJB:010160] Security Violation: User '<anonymous>' has insufficient permission to access EJB:*
    type=<ejb>,application=Xellerate,module=xlDataObjectBeans.jar,ejb=tcReconciliationoperations,method=createDeleteReconciliationEvent
    at Thor.API.Operations.tcReconciliationOperationsClient.createDeleteReconciliationEvent(UnKnown Source).
    I got this error as soon as my code start creating Delete Reconciliation Event.
    Note: I have already protected the JNDI Namespace.
    Please provide some pointers.
    Regards,
    Sunny

    Hi Rajiv,
    Check this:
    package com.centrica.iam.scheduletask;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileFilter;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.text.SimpleDateFormat;
    import java.util.ArrayList;
    import java.util.Calendar;
    import java.util.Date;
    import java.util.HashMap;
    import java.util.Hashtable;
    import java.util.Iterator;
    import java.util.Set;
    import oracle.iam.connectors.common.ConnectorLogger;
    import com.thortech.xl.dataaccess.tcDataSet;
    import com.thortech.xl.dataaccess.tcDataSetException;
    import com.thortech.xl.dataobj.PreparedStatementUtil;
    import com.thortech.xl.orb.dataaccess.tcDataAccessException;
    import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
    import Thor.API.tcResultSet;
    import Thor.API.Exceptions.tcAPIException;
    import Thor.API.Exceptions.tcInvalidValueException;
    import Thor.API.Operations.tcLookupOperationsIntf;
    import Thor.API.Operations.tcReconciliationOperationsIntf;
    import Thor.API.Operations.tcSchedulerOperationsIntf;
    public class CustomFlatFile extends SchedulerBaseTask {
         private static tcSchedulerOperationsIntf schedulerIntf;
         private static tcLookupOperationsIntf lookupIntf;
         private static tcReconciliationOperationsIntf reconIntf;
         String sObjectName;
         String LookupName;
         String LookupName2;
         String FileDirectory;
         String FileName;
         String File;
         String delimeter;
         String isDeleteTrue;
         HashMap<String, String> attrMap = new HashMap();
         HashMap<String, String> delMap = new HashMap();
         HashMap<String, String> finalMap = new HashMap();
         ArrayList list = new ArrayList();
         public boolean isReconStopped;
         public CustomFlatFile()
              isReconStopped = false;
         public void init()
              LookupName = getAttribute("Attribute Lookup Name");
              FileDirectory = getAttribute("Directory Path");
              FileName = getAttribute("File Name");
              delimeter = getAttribute("Delimeter");
              sObjectName = getAttribute("Resource Object Name");
              isDeleteTrue = getAttribute("Is Delete Allowed");
         public void execute(){
              try {
                   System.out.println("Start Exceute");
                   //Initiate lookupIntf
                   lookupIntf = (tcLookupOperationsIntf)getUtility("Thor.API.Operations.tcLookupOperationsIntf");
                   reconIntf=(tcReconciliationOperationsIntf)getUtility("Thor.API.Operations.tcReconciliationOperationsIntf");
                   catch (tcAPIException tcapiexception){
                        tcapiexception.printStackTrace();
                        //logger.error(classname, s, tcapiexception.toString());
                        //logger.setStackTrace(tcapiexception, classname, s, tcapiexception.getMessage());
                   catch (Exception excep){
                        excep.printStackTrace();
                        //logger.error(classname, s, excep.toString());
                        //logger.setStackTrace(excep, classname, s, excep.getMessage());
                   attrMap = readLookup(LookupName);
                   System.out.println(attrMap.toString());
                   readFile();
                   if (isDeleteTrue.equalsIgnoreCase("true"))
                        performDelete();
                   System.out.println("Finish Execute");
         public void performDelete()
              System.out.println("Start Perform delete");
              int k = list.size();
              System.out.println("list size " + list.size());
              try
                   Thread.sleep(15000);
         /*     Hashtable ahashtable[] = new Hashtable[k];
              Hashtable hashtable = new Hashtable();
              for (int i=0;i<k;i++)
                   hashtable.put("User Id", list.get(i));
                   ahashtable[i] = hashtable;
                   System.out.println(list.get(i));
              Set set = reconIntf.provideDeletionDetectionData(sObjectName, ahashtable);
              System.out.println("Set--" + set.toString());
              tcResultSet tcresultset = reconIntf.getMissingAccounts(sObjectName, set);
              System.out.println("tcresultset - " + tcresultset.getRowCount());
              if (!(tcresultset.isEmpty()))
                   long l[] = reconIntf.deleteDetectedAccounts(tcresultset);
                   for (int i1=0;i1<l.length;i1++)
                        System.out.println("delete recon key " + l[i1]);
              //Get the existing list of Managed users
                   tcDataSet tcdataset = new tcDataSet();
                   tcDataSet tcdataset1 = new tcDataSet();
                   String query = "select orf.orf_fieldname,prf.prf_columnname, sdk.sdk_name from orf, sdk, pkg, tos, prf, obj " +
                             "where pkg.obj_key = obj.obj_key and pkg.pkg_key = tos.pkg_key and tos.sdk_key is not null " +
                             "and tos.sdk_key=sdk.sdk_key and tos.tos_key=prf.tos_key and prf.prf_iskey='1' and prf.orf_key=orf.orf_key " +
                             "and orf.orf_parent_orf_key is null and obj.obj_name='" + sObjectName + "'";
                   tcdataset.setQuery(getDataBase(), query);
                   tcdataset.executeQuery();
                   String FFName = tcdataset.getString("prf_columnname");
                   String FName = tcdataset.getString("sdk_name");
                   String ROFName = tcdataset.getString("orf_fieldname");
                   System.out.println("form- " + FName + " Field- " + FFName);
                   query = "select " + FFName + " from " + FName + " udtable, oiu a, ost b " +
                             "where udtable.orc_key=a.orc_key and a.ost_key=b.ost_key and b.ost_status!='Revoked'";
                   System.out.println(query);
                   tcdataset1.setQuery(getDataBase(), query);
                   tcdataset1.executeQuery();
                   int i = tcdataset1.getRowCount();
                   ArrayList list1 = new ArrayList();
                   String s1 = null;
                   System.out.println("N. of rows--" + i);
                   for (int j=0;j<i;j++)
                        tcdataset1.goToRow(j);
                        s1 = tcdataset1.getString(0);
                        System.out.println("s1---" + s1);
                        if (!(list.contains(s1)))
                             list1.add(s1);
                             System.out.println("under if--" + s1);
                   //Getting the existing list of unmanaged users
                   query = "select distinct (b.rcd_value) from rce a, rcd b, orf c, obj d where a.rce_key=b.rce_key and " +
                             "b.orf_key=c.orf_key and c.orf_fieldname='" + ROFName + "' and a.rce_status!='Event Linked' " +
                                       "and a.obj_key = d.obj_key and d.obj_name='" + sObjectName + "'";
                   tcdataset1.setQuery(getDataBase(), query);
                   tcdataset1.executeQuery();
                   i = tcdataset1.getRowCount();
                   System.out.println("No. Of Unmanaged Users " + i);
                   for (int j=0;j<i;j++)
                        tcdataset1.goToRow(j);
                        s1 = tcdataset1.getString(0);
                        System.out.println("s1---" + s1);
                        if (!(list.contains(s1)))
                             list1.add(s1);
                             System.out.println("under if--" + s1);
                   int k1 = list1.size();
                   System.out.println("list1 size--" + k1);
                   for (int j1=0;j1<k1;j1++)
                        delMap.clear();
                        delMap.put(ROFName, (String)list1.get(j1));
                        System.out.println(delMap.toString());
                        long l = reconIntf.createDeleteReconciliationEvent(sObjectName, delMap);
                        System.out.println("delete recon key--- " + l);
              catch (Exception exception)
                   exception.printStackTrace();
         public void readFile(){
              String s = "readFile()";
              //logger.setMethodStartLog(classname, s);
              HashMap map = new HashMap();
              try {
              File = getFile();
              BufferedReader reader = new BufferedReader(new FileReader(new
                        File(File)));
              String line = "";
              int k = attrMap.size();
              String value[] = new String[k];
              String Header[]= new String[k];
              if (delimeter.equalsIgnoreCase("|"))
                   delimeter = "\\" + delimeter;
                   line = reader.readLine();
                   Header = line.split(delimeter);
                   while((line = reader.readLine()) != null)
                        value = line.split(delimeter);
                        k = value.length;
                        for (int i = 0;i<k;i++){
                             finalMap.put(attrMap.get(Header), value[i]);
                        System.out.println(finalMap.toString());
                        System.out.println("Start Ignoring Event");
                        if (!(reconIntf.ignoreEvent(sObjectName, finalMap)))
                             System.out.println("Not Ignored");
                        long l1 = reconIntf.createReconciliationEvent(sObjectName, finalMap, true);
                        System.out.println("Recon Key--" + l1);
                        else
                             System.out.println("ignore event ---" + finalMap.toString());
                        list.add(finalMap.get("User Id"));
                        System.out.println(list.size() + "add--" +finalMap.get("User Id") );
                        finalMap.clear();
              catch (Exception exception)
                   exception.printStackTrace();
         public boolean stop(){
              String s = "stop()";
              //logger.setMethodStartLog(classname, s);
              //logger.info(classname, s, "Stopping Reconciliation........");
              isReconStopped = true;
              //logger.setMethodFinishLog(classname, s);
              return true;
         FileFilter fileFilter = new FileFilter()
         public boolean accept(File file)
         String sFilePath = file.getName();
         if( sFilePath.startsWith(FileName) )
         return true;
         else
         return false;
         public String getFile() throws FileNotFoundException, Exception{
              String s = "getFile()";
              //logger.setMethodStartLog(classname, s);
              String s1;
              File dir =     new File(FileDirectory);
              File[] files = dir.listFiles(fileFilter);
              if (files.length ==0)
                   throw new FileNotFoundException();
              if (files.length>1)
                   throw new Exception("Multiple Matches found for this file name");
              s1 = files[0].toString();
              //logger.setMethodFinishLog(classname, s);
              return s1;
         public HashMap readLookup(String s1){
              String s = "readLookup()";
              //logger.setMethodStartLog(classname, s);
              HashMap map = new HashMap();
              try {
              tcResultSet tc1=     lookupIntf.getLookupValues(s1);
              int i = tc1.getRowCount();
              for (int j = 0;j<i;j++){
                   tc1.goToRow(j);
                   map.put(tc1.getStringValue("Lookup Definition.Lookup Code Information.Code Key"), tc1.getStringValue("Lookup Definition.Lookup Code Information.Decode"));
              catch (tcAPIException tcapiexception){
                   tcapiexception.printStackTrace();
                   //logger.error(classname, s, tcapiexception.toString());
                   //logger.setStackTrace(tcapiexception, classname, s, tcapiexception.getMessage());
              catch (Exception excep){
                   excep.printStackTrace();
                   //logger.error(classname, s, excep.toString());
                   //logger.setStackTrace(excep, classname, s, excep.getMessage());
              return map;

Maybe you are looking for

  • Compensatory quota generation

    Dear Experts, Can anybody help me out with Compensatory quota generation concept?what is the  main purpose...? Employee working on weekly off and holidays,  are eligible for compensatory off.?Then how compensatory quota generation take place  in nega

  • Latest Java release (1.6.0_25) crashes systematically on Firefox

    The online software developed by my company uses multiple Java applets on the page. When we tested the latest Java update (1.6.0_25) last week, we realized that Java would unexpectedly stop when used with Firefox. I managed to create a test page to r

  • My songs purchased from iTunes keep showing as processing or waiting.

    I Am a new user of iPad mini. Have purchased songs in iTunes and they just show as processing or waiting. Have got cookies on safari set to not from third parties etc. totally not a tech person so need basic help please.

  • Automatic startup of admin server + managed server on Windws

    Hello, I have installed/configured WLS 10.3.6 + Forms/Reports 11.1.2.1 on Windows 2008 R2. All this went ok with no errors. The NodeManager is installed as a service and runs happily after every reboot of the server. OPMN does it as well. I can conne

  • DBUnit problem

    I don't know if this is in the right forum (move it if not please). I'm writing a unit test with Junit and DBUnit. The error i've got is SQLException: No data is availablePieces of code: setUp method           super.setUp();           ds = new BasicD