Some already noticed. There will be a Windows PowerShell module for SwyxWare v8.0. I want to explain how it came to be, what's the status is and where we're heading.
What is Windows PowerShell?
Windows PowerShell is Microsoft's successor of the old DOS command prompt. It's a command shell and scripting language based on Microsoft.Net. The name sounds exaggerated, but the shell is powerful. You have the full Microsoft.Net class library available. Filesystem, Registry, WMI, Windows Performance Counter, Windows Eventlog, databases, active directory. It's all covered. Microsoft no longer releases any Windows server product without PowerShell support.
Wikipedia has some details about the shell: http://en.wikipedia.org/wiki/Windows_PowerShell
What is a PowerShell module?
A module is an easy to install package of PowerShell commands, scripts, aliases, etc. You get a bunch of files to copy into a well-known folder on your hard disk, enter
import-module <modulename>
in your shell and you're ready to go.
Why a SwyxWare PowerShell module?
I played with PowerShell and SwyxWare a couple of years ago, but the Microsoft WSE 3.0 based ConfigDataStore API of SwyxWare v6.0 cannot be easily used in PowerShell. With SwyxWare v8.0 the CDS Client is based on Microsoft Communication Foundation instead of WSE, PowerShell got modules for easy deployment and using both together was now straight-forward.
There are several reasons for a SwyxWare PowerShell module. First it started as a spare time project of myself, because I want to explore what’s possible with Windows PowerShell, and check if it might be an answer to the bulk-administration features some partners and customers are missing in SwyxWare for some time. Later, we needed an easy and flexible way to write smoke tests for our automatic build system for SwyxWare v8.0 and I used the PowerShell support I had written. Finally some test engineers started using it to automate some tests and we’re now convinced that it will indeed be a powerful administration tool for SwyxWare complementing the classic Microsoft Management Console.
Why an Open-Source Project on this website?
The SwyxWare PowerShell module will not be a part of the product. At least not in v8.0. We simply have not the time to create a feature set which is ready for a production release. To get a feature into the product you need to design it, implement it, document it, localize it, test it, train our support staff. That's just not possible for v8.0, sorry.
PowerShell is rather new for us. There are some guidelines from Microsoft on how to design cmdlets, what are the most important do’s and don’ts. But we do not feel we have enough experience to design a good enough set of cmdlets to keep it for a long time. If we add a set of cmdlets to the product we cannot change it in the next version, without breaking existing scripts you might have written in the meantime. As a product feature it would be much more “fixed” than it should be at this stage.
The SwyxWare PowerShell module is completely written as PowerShell scripts. Just fire up a text editor of your choice, open the ps1-files and have a look. It's fully based on the ConfigDataStore API, SwyxWare's official configuration API. So it's open anyway. Everybody could change or extend it. Therefore hosting it as a project here is an ideal way to let the whole Swyx community benefit by sharing your scripts and extensions. It lets the community and and Swyx itself gain experience and allows us to change and complete it as we see fit without the restrictions of a tight product release schedule.
What can I do with it?
Theoretically you're able to configure everything what's is possible to configure with SwyxWare Administration. In practice you need to have PowerShell commands, called Cmdlets to make it easy to use the CDS API inside the shell. While it's possible to use the whole CDS API inside PowerShell, it's not that easy, because CDS API had been designed with a software developer in mind, not an administrator.
The first published version of the module will have some cmdlets for the most important aspects of SwyxWare Administration.
Here are some tasks you could do with the module and some Windows PowerShell know-how:
- You can retrieve user objects, filter, sort, list them, make changes. You can create users, set there properties, delete them, add or remove them to/from groups.
- You can create, edit or delete trunks, trunk groups, routing records,
- Import or update SwyxWare users from another data source like a database, csv file, active directory.
- Logoff users
- Retrieve or set standard redirections
- Retrieve or set users rich presence status or status text
- Because CDS API can be used via a network you can run PowerShell on a separate system and manage one or more SwyxWare instances.
There are probably a lot more we just cannot imagine right now.
What is not possible (yet)?
Some aspects of a user like the speed dial key, line key configuration or the functional permissions are stored in a binary field in the database which is transparent for the CDS API. The first published PowerShell module will have no means to read or write that information. But there will be support for that part of a SwyxWare user object, too, hopefully when SwyxWare v8.0 ships.
The ConfigDataStore API is a configuration API and so is the PowerShell module. You cannot make or receive call. That will not change for the foreseeable future.
What do I need to use it?
- Windows PowerShell 2.0
- SwyxWare v8.0
- SwyxWare Administration v8.0 or SwyxIt! v8.0 installed on the system where you're using the module.
- Some experience with Windows PowerShell is an advantage
- Some knowledge about writing scripts probably helps as well.
Where can I get support?
As long as it's an open-source project on this website, i.e. the Swyx community is your support team. However, Swyx development and QA is using it, too, and will increase it's usage in the future. Expect some Swyx software and test engineers to participating here. Sebastian the project lead for the PowerShell module on this Website is a Swyx software developer, too. I will also read the project's forum regularly and answer questions.
Conclusion
I’m really exited. IMHO Windows PowerShell is one the best products Microsoft released in the last couple of years. Supporting it in SwyxWare will eventually make administrator’s life much, much easier. We will use and extend it internally at Swyx and will contribute to the project.