Highlight a phrase and click this icon to search it on Swyx-Forum   Highlight a phrase and click this icon to search it within the Swyx Knowledgebase   Highlight a phrase and click this icon to search it using Goolge   Highlight a phrase and click this icon to search it using Wikipedia

 

Highlight a phrase and click this icon to search it on Swyx-Forum   Highlight a phrase and click this icon to search it within the Swyx Knowledgebase   Highlight a phrase and click this icon to search it using Goolge   Highlight a phrase and click this icon to search it using Wikipedia

List of Blogs
Search Blogs
Blog Archive

Most recent blog entries

 

Most recent blog entries

 

Okt28

Written by:Martin
28.10.2009 10:15 

The most exiting new product Microsoft made in recent years is Windows Powershell. Yesterday they released version 2.0 as part of the

Windows Management Framework

While Microsoft positions it as the Windows management tool every administrator must know, I find it equally useful in software development. As soon as you start using it and write Powershell scripts you’ll never go back to batch files. But besides the great scripting the shell itself make day-to-day work of a developer much easier. I often see colleagues doing this to stop a service:

  1. Navigate through Windows start menu to find the Services mmc snapin
  2. Make the MMC window bigger, because the default size is always too small
  3. Sroll through the services list to find the service
  4. Select the service
  5. Click the Stop button in the toolbar to stop the service.

Even if you have the services snapin already open, this is tedious. Using an already running Powershell window you just type

spsv myService

and hit enter. To work with SwyxWare services I wrote a small Powershell function returning all installed SwyxWare services called get-swyxsvc, gave it alias gsw and now can do things like this:

Stop all SwyxWare services:

gsw| spsv –force

or list all SwyxWare service with the current state

gsw | ft name,  status

or list all running SwyxWare services

gsw | ? { $.state –eq “running”}

I also have scripts to update SwyxIt and SwyxWare Administration installed on my PC to the newest daily build. It does not show the usual setup wizard, but installs both without user interaction.

If you run a SwyxWare v7.0 setup MSI, you have a setup package which got built using a combination of Windows Installer XML, some old batch files and a lot of new Powershell scripts.

I just wish I had the time to build Powershell cmdlets for managing SwyxWare. Wouldn’t it be great being able doing things like this:

get-swyxwareuser | where { $_.internalnumbers –contains 4711 }

or

100 .. 199 | foreach-object { $u = new-SwyxWareUser; $u.Name = “User $_”; $u.InternalNumbers.Add($_); $u.Save() }

or

200 .. 210  | foreach-object { $u = get-swyxwareUser | where { $_.InternalNumber –contains $_}; $u.FaxNumbers.Add($_ + 100); $u.Save() }

or

get-SwyxWareTrunk –computer MySwyxServer | format-table Name, usedChannels, MaxChannels

 

 

Tags:

 


Your name:
Your email:
(Optional) Email used only to show Gravatar.
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment  Cancel 
Blog Help
Sponsors
UCIT cloud communication
IPIT Ltd
bluvo AG
logic-base GmbH
Atia Communications

 

 

logic-base GmbH
www.logic-base.de
Atia Communications
www.atiacomms.com
UCIT Nordic
www.ucit.no
IPIT Ltd
www.ipit.co.uk
bluvo AG
www.bluvo.de
logic-base GmbH
www.logic-base.de
Atia Communications
www.atiacomms.com
UCIT Nordic
www.ucit.no
IPIT Ltd
www.ipit.co.uk
bluvo AG
www.bluvo.de