Hello,
I have 2 management servers and i am trying to do some scripts... on one management server the below comands are working on another one i get an error like below...
Any ideea??
C:\SCOMScripts>powershell
Windows PowerShell
Copyright (C) 2012 Microsoft Corporation. All rights reserved.
PS C:\SCOMScripts> add-pssnapin "Microsoft.EnterpriseManagement.OperationsManage
r.Client";
PS C:\SCOMScripts> $server = "localhost"
PS C:\SCOMScripts> new-managementGroupConnection -ConnectionString:$server;
PathName :
ManagementGroup : HELSCOM12
ManagementServerName : localhost
Drives :
PS C:\SCOMScripts> set-location "OperationsManagerMonitoring::";
PS Microsoft.EnterpriseManagement.OperationsManager.Client\OperationsManagerMonitoring::> Get-SCOMAlert
Get-SCOMAlert : The term 'Get-SCOMAlert' is not recognized as the name of acmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-SCOMAlert
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-SCOMAlert:String) [], Comma
ndNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS Microsoft.EnterpriseManagement.OperationsManager.Client\OperationsManagerMonitoring::>