locked
Running a powershell console task against the RMS RRS feed

  • Question

  • Hi

    I am looking to have a console task that when an operator runs from the console will actually execute on the RMS. Just wondered if this was possible - either from the Task gui or via hacking any subsequent xml? The task manipulates an alert so basically at present I have the task working from the console so that when you have an alert selected, it is firing up a powershell script and all works fine.

    But! rather than have this powershell script on every console, I'd like it to be stored in one place - preferably the RMS.

    But I can't see of way of always getting the task to run on the RMS ... to be honest, I'm guessing there isn't a way of doing this via a console task ... so any other solutions welcome ;-)

    Cheers

    Graham


    View OpsMgr tips and tricks at http://systemcentersolutions.wordpress.com/
    Monday, August 3, 2009 6:58 PM

Answers

  • For sure, it can be done, very worse case scenario: a PowerShell script could be added to the systems where the consoles are installed.  As long as the OpsMgr PowerShell extensions are loaded there, the script could contact the RMS.
    Hi Marco

    That is what we do at the moment - the script does work but adminstratively it is very much a worst case scenario. But I'm thinking there is something in the name "Console Task" that tends to suggest that it runs on the console ;-)

    If we take OpsMgr out of the equation, what I am effectively trying to do is have someone sitting at  machine A, launching a powershell script via c:\windows\system32\blahblah\powershell.exe Script.ps1 and have Script.ps1 exisit  on a different machine. Can we effectively "throw" a command in this way using parameters on powershell.exe ? I guess not which is why I was looking at the OpsMgr approach. I was looking to try and use OpsMgr to set the machine the script would run on.

    Cheers

    Graham


    View OpsMgr tips and tricks at http://systemcentersolutions.wordpress.com/
    Tuesday, August 4, 2009 6:01 AM

All replies

  • OK, I know more about PowerShell than OpsMgr...  I'd have to investigate a bit.  You may have to edit the XML, but I'll be able to help with that.

    For sure, it can be done, very worse case scenario: a PowerShell script could be added to the systems where the consoles are installed.  As long as the OpsMgr PowerShell extensions are loaded there, the script could contact the RMS.

    Let me look into it...  In a big hurry?
    Monday, August 3, 2009 10:17 PM
  • For sure, it can be done, very worse case scenario: a PowerShell script could be added to the systems where the consoles are installed.  As long as the OpsMgr PowerShell extensions are loaded there, the script could contact the RMS.
    Hi Marco

    That is what we do at the moment - the script does work but adminstratively it is very much a worst case scenario. But I'm thinking there is something in the name "Console Task" that tends to suggest that it runs on the console ;-)

    If we take OpsMgr out of the equation, what I am effectively trying to do is have someone sitting at  machine A, launching a powershell script via c:\windows\system32\blahblah\powershell.exe Script.ps1 and have Script.ps1 exisit  on a different machine. Can we effectively "throw" a command in this way using parameters on powershell.exe ? I guess not which is why I was looking at the OpsMgr approach. I was looking to try and use OpsMgr to set the machine the script would run on.

    Cheers

    Graham


    View OpsMgr tips and tricks at http://systemcentersolutions.wordpress.com/
    Tuesday, August 4, 2009 6:01 AM
  • "Mark as Answer", no activity for a month. Feel free to re-open this
    Anders Bengtsson | Microsoft MVP - Operations Manager | http://www.contoso.se
    Monday, November 23, 2009 10:53 PM