Skip to main content
MMCUG Logo

MMCUG Blogs

Go Search
Home
MMCUG Blogs
Events
Event Registration
Directions
Sponsors
Links
LinkedIn
Search
  

> MMCUG Blogs > Categories
Is PowerShell Really a Shell?

"Is PowerShell really a new shell, or is it a new scripting language?"  Customers ask me this question quite a bit.  I guess it really depends on your definition.  If you reference Wikipedia for a definition of command shell (http://en.wikipedia.org/wiki/Shell_(computing) ), you'll get this:

"In computing, a shell is a piece of software that provides an interface for users. Typically, the term refers to an operating system shell which provides access to the services of a kernel."

So, by that definition, then you would probably have to say "yes", as PowerShell certainly can do this.   However, that definition doesn't really cover all the bases for some users.  Some users feel that a shell should allow very simple but very robust command line interface actions.  In other words, they should be able to access anything in the system with a few basic keystrokes.

I will have to admit that until recently I've mostly used PowerShell for scripting only, and haven't really taken to using it as a shell.  In order to test to see if PowerShell could really be used as an everyday shell, I decided to give PowerShell a one month test run as a shell first and scripting language second.

A Few Minor Issues:

As I began using PowerShell as my daily shell, I ran into a few minor issues due to syntax.  For instance, in a CMD/DOS shell, the following works:

                CD\ 
                CD..

The problem is, this doesn't work in PowerShell, as CD is actually an alias to Set-Location.  You now have to use:

                CD \ 
                CD ..

Not a huge issue, but having been using the former since the DOS 6.22 days, it takes a bit of retraining to get used to.  You'll find many of the commands you used to use will have this type of limitation. 

The other issue I ran into were in regards to switch usage.  While most old DOS style commands will work (i.e. DIR /P) not all commands are represented.

What this really boils down to is that if you are very familiar with DOS type commands, not everything is going to work as you previously knew it.  As PowerShell is a new shell, some commands may have to be relearned/adjusted to work properly.

Using Legacy Shell Scripts:

I also have a lot of old batch files/shell scripts that I have laying around.  I still use most of them.  What I did find with these is that the majority of them worked, however, some needed to be upgraded to deal with switch and parameter issues as discussed previously.  You do have to start them in the same way you start PowerShelll scripts, by executing a backslash in front of them such as:  .\runme.bat

One of the main issues I ran into is chaining separate .EXE files.

For instance, when I ran a script that executes an .EXE that extracts data from Active Directory to a CSV file for processing, I found that PowerShell did not wait for the EXE file to finish while the old CMD shell did.  This can normally be handled by using the START /WAIT command in the standard Windows shell, but this will not work in PowerShell.  Hence, I had to come up with the following function to do this:

Function DirExport {

$StartApp = new-object System.Diagnostics.ProcessStartInfo

$StartApp.FileName  = "gwdirapp.exe"

$StartApp.Arguments = " /A user01"

$StartApp.WorkingDirectory = (get-location).Path

$GMEDirApp = [System.Diagnostics.Process]::Start($StartApp)

$GMEDirApp.WaitForExit()

}

Not as clean as I would have liked, but usable. By implementing this, you also have to upgrade the script from a .BAT or .CMD to a .PS1.

So, Shell or No Shell?:

Other than the issues above, I really encountered no major issues using PowerShell over the Windows DOS/CMD shell.  I think the important thing to remember is that PowerShell is both shell and a scripting language.  However, it's important to remember that if you're going to use it as a shell, then treat it as a NEW shell, and not just an upgrade of the existing DOS/CMD shell.  Some commands and functions may have to be reworked to function properly.

Eric Gentry
Senior Consultant
Project Leadership Associates

Direct SIP Gateway connection to Microsoft Speech Server 2007

There seems to be significant confusion on the new Microsoft Office Communications Server 2007 Speech Server role, publications on this new role are rare and not many folks are blogging on this important part of a Unified Communications deployment. My hope is that this blog will clarify some of the misconceptions and explain some of the work we have been doing with customers with this powerful technology. The Speech Server role can be installed independently or jointly with a full Microsoft Office Communications Server 2007 deployment. This flexibility allows a customer to utilize both technologies together or separately based on an organizations requirements and goals for the solution. The Speech Server role can directly interface with an existing PBX or PSTN line utilizing a common SIP Gateway, the same SIP gateways that we have used on countless Exchange 2007 Unified Messaging deployments. As I mentioned earlier you can also choose to install Microsoft Office Communications 2007 and Speech Server 2007 to complement each other. In this scenario, your environment would include a Microsoft Office Communications Server Front End server role, Mediation Server role, Speech Server role and a SIP gateway.

Many organizations that could use the powerful applications provided by the Speech Server 2007 role today may not be ready for a full Microsoft Office Communications Server 2007 for a multitude of reasons. What value can an organization gain by deploying Speech Server 2007? Allow me a least a few:

  1. Many organizations rely heavily on Interactive Voice Response (IVR) systems. Many of these legacy solutions are not very flexible, are very expensive, and often the organizations have no internal knowledge of the system. Speech Server 2007 is an interactive solution that any .Net Developer can use to create complex call routing and IVR solutions. This reduces complexity and cost of these solutions allowing the customer to have additional flexibility and the ability to update the systems to better match their evolving business and business processes.
  2. Another new advantage in Speech Server 2007 is a processing system called Conversational Understanding. It is a natural speech recognition and processing system that allows a caller to speak more naturally and the system to handle that more natural speech.
  3. Lastly Speech server is VoIP enable out of the box, including Session Initiation Protocol (SIP) (define) and Real-Time Transport Protocol (RTP). It has Analytics Studio and Business Intelligence Tools to provide users with customized, detailed usage reports. Analytics Studio provides a variety of predefined reports while Business Intelligence Tools provide managers with a long-term view of a callers behavior.

     

Below I have outlined a simple scenario that we deployed at a customer site for a pilot of these solutions:

  1. The call originates from the PSTN to the PBX, and is routed to Analog/Digital ports connected to the SIP Gateway.
  2. The SIP gateway then converts the TDM signal to SIP and routes to the Speech Server.
  3. This scenario assumes SIP transactions will use TCP port 5060 and the Speech Server has an application using 200 as an Identifier.

 

How did we configure the gateway?

 

  1. Go to Configure IP – input IP info

 

 

 

 

 

  1. Next go to System – Operating mode as SIP and PCM coding as Ulaw

 

 

 

  1. Next enter you VoIP endpoint ID – in this case it would be the Speech Server 192.168.0.100

 

 

 

 

 

  1. Next Select Gateway Advanced – Send DNIS to VoIP Endpoint - Yes

 

 

 

 

 

  1. Next go to Dial Plan and Select CPID Manipulation Create a Speech server rule and add "200" as the Redirect Party Change Rule, Make sure it is the first rule.

This will reference the Speech server application using EXT 200 as the Identifier.

 

 

 

 

 

  1. Next select the Inbound TDM Routing Tab – Create a Rule called Speech Server with these settings and apply the Speech server CPID manipulation rule created previously.

 

 

 

 

 

 

  1. Next Configure SIP – set Transport type TCP under User-Agent, Under TCP/UDP set server port as 5060

 

 

 

 

 

  1. Next Select Restart and Restart the gateway of good measure

 

 

 

 

 

  1. Finally call Extension 200 from an internal PBX extension, Speech Server should answer with whatever Voice application was assigned to the 200 Identifier.

Robert Ziolkowski
Voice Consultant
Project Leadership Associates

Exchange Unified Messaging Codec Selection

Exchange 2007 Unified Messaging can use any of the following three audio codecs to create and store voice messages:

  • Windows Media Audio (WMA)
  • Group System Mobile (GSM) 06.10
  • G.711 Pulse Code Modulation (PCM) Linear

Many customers have asked us about which codec they should select and why. One problem is that with the Exchange 2007 System Manager, an administrator can only set the codec at the dial plan level. This can cause issues with other devices, for example Blackberry or IPhone mobile devices. These third party devices do not support the WMA codec, but if you have mostly Windows Mobile devices and a few Blackberry and/or IPhone devices in your organization, it makes sense to go with the WMA codec for the dial plan as it is the most highly compressed audio codec of the three, with a compression of 11,000 bytes per each 10 seconds, but you will still need to support your non Windows Mobile users.

The good news is that with the introduction of Exchange 2007 Service Pack 1, you can now set the codec used to storage voice messages on per user basis using Powershell.

The key is to use the CallAnsweringAudioCodec option with the Set-UMMailbox command. For example, if we have a UM enable mailbox with the username "jose", we will type the following to changes the voice message codec.

Set-UMMailbox "jose" -CallAnsweringAudioCodec GSM

The codec options are WMA, GSM or PCM. If we want to determine which codec a specific user is configure for, we will use the following command:

Get-UMMailbox "jose" | format-list

And look for the value of the CallAnsweringAudioCodec attribute.

Jose Girbes
Senior Consultant
Project Leadership Associates

Copyright © MMCUG - Midwest Messaging and Collaboration User Group 2008 Terms and conditions