Import Module with custom powershell activity not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2017 10:04 PM
HI Together,
I ´m trying to run a custom powershell activity which should Import the lync module on the mid-Server.
Then get the UPN of the user and run some lync commands.
I have installed the lync powershell module on the mid Server and can also Import it directly on the Server.
But anytime i try it within the Orchestration powershell activity i get the following error:
The specified module 'lync' was not loaded because no valid module file was found in any module directory
What i ´m doing wrong ?
My Script Looks like this:
Thanks for your help
- Labels:
-
Orchestration

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2017 10:12 PM
Hello Christoph,
Please check the target host is correct or not.
Target host 127.0.0.1 is a loop back address but it should be Host name or IP address of the target server for this PowerShell activity.
ServiceNow Commnunity MVP -2018 class.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2017 11:54 PM
Hi,
servicenow Support told us to use this ip adress if we want to use the midserver to run scripts.
But for sure i also tried to use the Hostname or IP but the result is the same, he does not recognize the module.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2017 12:38 AM
Hello Christoph,
You are running the power shell activity on the local machine or remote machine?
If it is local machine use 127.0.0.1,
else use the ip address of the host
Refer the below link may helpful to you.
PowerShell Probe and Utility for ServiceNow | John Andersen
ServiceNow Commnunity MVP -2018 class.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2017 12:42 AM
Hey Karthik,
thank you, but my problem is that the activity does not recognize the lync module for powershell which is intalled on the mid server.
brgds