We help IT Professionals succeed at work.

Powershell Script error

ddd1234
ddd1234 asked
on
Attached script and error.
Thanks
Script.txt
Error-Script.txt
Comment
Watch Question

Raheman M. AbdulMessaging and Directory Services

Commented:
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

Commented:
Thanks, the MOM.api error is gone .
But looks like it's going in my SQLQuery statement and throwing errors.

Author

Commented:
Thanks, it resolved the error