Answered by:
How to use -path parameter

Question
-
Hello,
I would like to create my own scripts for maintenance mode windows. I would like to use my similar previos scripts, but it doesnt work.
In R2 version, parameter -path is required. I dont know how to work with this parameter exactly.
This is from command shell:
Get-MonitoringClass : The 'Path' parameter is empty or the required provider locati
on is not set."
At line:1 char:20
+ get-monitoringclass <<<< -name "Microsoft.Windows.Computer"
Thanks
JanFriday, August 14, 2009 12:24 PM
Answers
-
Looks like you might have moved outside of the Ops Mgr provider, perhaps back into the file system. Make sure your prompt looks something like “PS Monitoring:\”
Thanks,
-Lincoln
PS D:\Program Files\System Center Operations Manager 2007>get-monitoringclass -name 'Microsoft.Windows.Computer'
Get-MonitoringClass : The 'Path' parameter is empty or the required provider location is not set."
At line:1 char:20
+ get-monitoringclass <<<< -name 'Microsoft.Windows.Computer'
+ CategoryInfo : InvalidArgument: (:String) [Get-MonitoringClass], ArgumentOutOfRangeException
+ FullyQualifiedErrorId : InvalidParameter,Microsoft.EnterpriseManagement.OperationsManager.ClientShell.GetMonitor
ingClassCmdlet
PS D:\Program Files\System Center Operations Manager 2007>cd monitoring:\
PS Monitoring:\>get-monitoringclass -name 'Microsoft.Windows.Computer'
ManagementGroup : ...
PropertyCollection : {PrincipalName, DNSName, NetbiosComputerName, NetbiosDomainName...}
Base : ManagementPackElementUniqueIdentifier=a2c5fadc-aea2-114f-7f84-3b97d4980a85
Hosted : False
Singleton : False
Extension : False
OptimizationCollection : {}
FullTextSearchable :
XmlTag : ClassType
Abstract : False
Accessibility : Public
ManagementGroupId : c91e422d-662a-224f-d899-bdc2d02834d0
Name : Microsoft.Windows.Computer
Id : 7b070bc5-0f54-6663-f840-17affa1d6304
DisplayName : Windows Computer
Description : All Windows Computers
LanguageCode : ENU
Comment :
Status : Unchanged
LastModified : 8/11/2009 4:28:13 PM
TimeAdded : 8/11/2009 4:28:13 PM- Proposed as answer by Marco Shaw Friday, August 14, 2009 6:47 PM
- Marked as answer by Jan Matejka Friday, August 14, 2009 7:06 PM
Friday, August 14, 2009 3:04 PM
All replies
-
Looks like you might have moved outside of the Ops Mgr provider, perhaps back into the file system. Make sure your prompt looks something like “PS Monitoring:\”
Thanks,
-Lincoln
PS D:\Program Files\System Center Operations Manager 2007>get-monitoringclass -name 'Microsoft.Windows.Computer'
Get-MonitoringClass : The 'Path' parameter is empty or the required provider location is not set."
At line:1 char:20
+ get-monitoringclass <<<< -name 'Microsoft.Windows.Computer'
+ CategoryInfo : InvalidArgument: (:String) [Get-MonitoringClass], ArgumentOutOfRangeException
+ FullyQualifiedErrorId : InvalidParameter,Microsoft.EnterpriseManagement.OperationsManager.ClientShell.GetMonitor
ingClassCmdlet
PS D:\Program Files\System Center Operations Manager 2007>cd monitoring:\
PS Monitoring:\>get-monitoringclass -name 'Microsoft.Windows.Computer'
ManagementGroup : ...
PropertyCollection : {PrincipalName, DNSName, NetbiosComputerName, NetbiosDomainName...}
Base : ManagementPackElementUniqueIdentifier=a2c5fadc-aea2-114f-7f84-3b97d4980a85
Hosted : False
Singleton : False
Extension : False
OptimizationCollection : {}
FullTextSearchable :
XmlTag : ClassType
Abstract : False
Accessibility : Public
ManagementGroupId : c91e422d-662a-224f-d899-bdc2d02834d0
Name : Microsoft.Windows.Computer
Id : 7b070bc5-0f54-6663-f840-17affa1d6304
DisplayName : Windows Computer
Description : All Windows Computers
LanguageCode : ENU
Comment :
Status : Unchanged
LastModified : 8/11/2009 4:28:13 PM
TimeAdded : 8/11/2009 4:28:13 PM- Proposed as answer by Marco Shaw Friday, August 14, 2009 6:47 PM
- Marked as answer by Jan Matejka Friday, August 14, 2009 7:06 PM
Friday, August 14, 2009 3:04 PM -
Friday, August 14, 2009 6:56 PM
-
Hi Lincoln.....yes, of course. My mistake.:-)
I have leaved OpsMgr provider.
Thanks
JanFriday, August 14, 2009 7:06 PM -
Thanks Marco, I know this article.
Thanks a lot.
JanFriday, August 14, 2009 7:06 PM -
Hey Lincoln,
I Unable to find Monitoring directory on my operation manager machine .
Could you please let me know where I can find this directory and what this directory should contain?
Thanks in Advance
Friday, July 23, 2010 1:05 AM