Swyx PowerShell
Before you can use the IpPbx cmdlets in PowerShell, you need to install the modules first. Grab the IpPbx modules from here, be sure to get the correct version:
http://www.swyx-forum.com/community/Projects/IpPbxPowershellModule/Downloads/tabid/328/Default.aspx
Don’t forget to run the following command first:
Set-ExecutionPolicy unrestricted
[quads id=1]
As our ‘My Documents’ folder live on the domain server, we had some issues. The install appeared to go ok, as you can see:
-----------------------------------------------
IPPBX POWERSHELL MODULE - INSTALLATION SCRIPT
-----------------------------------------------
1. Install for Current User only
2. Install for All Users
3. Remove every module version
WARNING:
PLEASE NOTE THAT OTHER MODULE VERSIONS
WILL BE DELETED DURING INSTALLATION!
Select 1-3: 1
-----------------------------------------------
Searching for other Module Versions...
Installing for Current User...
-----------------------------------------------
Process completed!
Press any key to continue ...
Do not do the above! Because you then get this:
PS C:\Users\xxx\Desktop\IpPbxPowerShellModule_v8.1.0.50 (1)> Import-Module IpPbx
Add-Type : Could not load file or assembly 'IpPbxBLOB64, Version=8.0.0.3, Culture=neutral, PublicKeyToken=null' or one
of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)
At \\xxx\Users\xxx\WindowsPowerShell\Modules\IpPbx\IpPbx.psm1:106 char:13
+ add-type <<<< -Path (join-path $ScriptFolder "Binaries\IpPbxBlob64.dll") | out-null
+ CategoryInfo : NotSpecified: (:) [Add-Type], FileLoadException
+ FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.AddTypeCommand
This is because it installed the modules in the folder on the server, and network paths are not trusted.
Instead, install for all users – option 2 (you need to run the PowerShell command prompt as Administrator).
To check the install, run the following command:
get-module -ListAvailable
The result list must contains the following entries:
Script Accelerators
Manifest IpPbx
If it does, then all should be well.
For more information on Swyx telephony & the Swyx Powershell modules, please check out the following link:
www.swyx.com
Check out my other posts regarding Swyx here:
https://roguelj.co.uk/tag/swyx