Powershell Script error

Attached script and error.
Thanks
Script.txt
Error-Script.txt
ddd1234Asked:
Who is Participating?
 
ddd1234Author Commented:
Thanks, the MOM.api error is gone .
But looks like it's going in my SQLQuery statement and throwing errors.
0
 
Raheman M. AbdulSenior Infrastructure Support Analyst & Systems DeveloperCommented:
You need to import the module:
Add the following line at the top of your script.
Add-PSSnapin “Microsoft.EnterpriseManagement.OperationsManager.Client” -ErrorVariable errSnapin;

Open in new window

0
 
ddd1234Author Commented:
Thanks, it resolved the error
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.