header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

We have a new sponsor!  Introducting Pragma Systems.  See the home page for details.

SCOM get-alert -path parameter - what goes here?
Last Post 24 Apr 2010 10: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 01:45 PM  
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
Site Moderator
Advanced Member
Advanced Member
Posts:670
Avatar

--
23 Apr 2010 01:51 PM  
It all depends on your environment. This may help:
http://technet.microsoft.com/en-ca/magazine/2008.08.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.
Marco

*Microsoft MVP - Windows PowerShell
https://mvp.support.microsoft.com/profile/Marco.Shaw
*Co-Author - Sams Windows PowerShell Unleashed 2nd Edition
*Blog - http://marcoshaw.blogspot.com
LakeGatorUser is Offline
New Member
New Member
Posts:2
Avatar

--
24 Apr 2010 10: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.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 footer
footer