Importing the Lync/Skype Module

Luke K picture Luke K · May 31, 2016 · Viewed 12.7k times · Source

I'm trying to import the Skype for Business Online Connector module, but it's not going as planned. I'm following the steps outlined here: https://technet.microsoft.com/en-us/library/dn362829(v=ocs.15).aspx

It should be super simple, but it refuses to import. If the download wasn't an installation, I'd understand that I'd need to create a folder and put the psm file in that folder, which would be put in the modules directory. But the site says once the module is installed, everything should be good to go.

Am I missing something incredibly obvious or something? I even tried the command Import-Module SkypeOnlineConnector, as the installer doesn't mention Lync. But to no avail.

EDIT: The error message says:

Import-Module : File C:\Program Files\Common Files\Skype for Business Online\Modules\SkypeOnlineConnector\SkypeOnlineConnectorStartup.psm1 cannot be loaded because running scripts is disabled on this system.

Answer

gravity picture gravity · Jun 1, 2016

Execution policy errors are one of the easiest fixes to running PowerShell scripts. Here's a few links to help explain what the issue is you've run into:

You can either add a ExecutionPolicy RemoteSigned switch to your call of PowerShell, or can use Set-ExecutionPolicy to permanently change the execution policy on your system.

Do read up on the different policies, however, and consider leaving the policy at least on RemoteSigned for protection. While you can Bypass or Unrestricted the policy, it would leave your system potentially vulnerable to malicious scripts.