header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
SCOM get-alert -path parameter - what goes here?
Last Post 24 Apr 2010 01:54 PM by LakeGator. 2 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
LakeGatorUser is Offline
New Member
New Member
Posts:2
Avatar

--
23 Apr 2010 04:45 AM
    I have cobbled together a PowerShell script that lists all alerts created since the previous run of the script and sends a summary of these off to the disinterested parties in the operations group. The script works perfectly when run in the SCOM shell but gets annoyed when run as a scheduled task using normal PowerShell. I have included the SCOM snap-ins via
     
    Add-PSSnapin Microsoft.EnterpriseManagement.OperationsManager.Client

    The problem I am currently having is that the Get-Alert cmdlet is complaining that the path is not set:
     
    Get-Alert : The 'Path' parameter is empty or the required provider location is not set.

    I have searched for clues about what should be entered in the path parameter as well as trying various semi-random text to no avail.

    Any pointers and advice would be most welcomed.
    Marco ShawUser is Offline
    Veteran Member
    Veteran Member
    Posts:1684
    Avatar

    --
    23 Apr 2010 04:51 AM
    It all depends on your environment. This may help:
    http://technet.microsoft.com/en-ca/....scom.aspx

    Doing the add-snapin you outlined is not sufficient to recreate the environment you need to do OpsMgr tasks, but that article should help.

    Be sure to check out www.systemcentercentral.com and the forums and scripts there.
    LakeGatorUser is Offline
    New Member
    New Member
    Posts:2
    Avatar

    --
    24 Apr 2010 01:54 PM
    Thank you for your fast and very effective response, Marco.
     
    Just in case someone else is looking for a similar issue here is what made me go away happy  In searching through the SystemCenterCentral.com site I found this blog titled How to use the Powershell to get access to the SDK that discusses how to set the entire Operations Manager environment in ‘regular’ PowerShell. All the best!
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer