Tuesday, May 24, 2011

Documenting your Lync Voice Configuration

First off, all credit for this post goes to my colleague Chris Cook.  He provided all of the powershell scripting behind the tool.

UPDATED: Added download of file HERE

I have found it very difficult to easily document a voice configuration within Lync.  That is when I approached my scripting buddy Chris.  He developed this script to extract the export from the Lync Control Panel Voice Configuration:

LyncVoice - Export config - markup

When exporting the configuration, it saves as a *.vcfg file.  Using Chris’ handy powershell cmdlet, we can extract the contents of the *.vcfg file into an Excel spreadsheet with different tabs for each area: Dial Plan, Voice Policy, Route, PSTN Usage, and Trunk Configuration.

Copy the following powershell script as a .ps1 file and save in the same location as the exported *.vcfg file.

Download LyncVCFGConverter.ps1 here

##################################################
#
#  LyncVCFGConverter.ps1
#  Format Exported .vcfg file from Lync to Excel
#
#  Author: Chris Cook
#
#  Use at your own risk!
#
##################################################
 
 
cls
#Collect VCFG Filename from Command Line Arguments
$VCFGFileName = $args[0]
Write-Host "Importing XML Config..."
$VCFGXML = [xml](get-content $VCFGFileName)
Write-Host "Done"
 
#Get current working directory and convert it to a string.
$CurrentDirectory = Get-Location
$CurrentDirectory = $CurrentDirectory.ToString()
 
#Set the file name for the Excel Spreadsheet we're working with.
#Drop the VCFG extension and add " - Voice Config.XLSX" to the end.
Write-Host "Starting Excel..."
$ExcelFileName = $VCFGFileName.substring(0,$VCFGFileName.Length - 5) + " - Voice  Config.XLSX"
 
#Create the Excel Instance we will be working with.
$ExcelApp = New-Object -comobject Excel.Application
 
#Create a new Workbook and add 2 extra sheets for 5 total.
Write-Host "Configuring Worksheets..."
$Workbook = $ExcelApp.Workbooks.Add()
$Worksheets = $WorkBook.Worksheets.Add()
$Worksheets = $WorkBook.Worksheets.Add()
 
#Name the sheets in the Workbook and assign variables to them.
$LocationProfilesSheet = $Workbook.Worksheets.Item(1)
$LocationProfilesSheet.Name = "Location Profiles"
$PSTNUsagesSheet = $Workbook.Worksheets.Item(2)
$PSTNUsagesSheet.Name = "PSTN Usages"
$PSTNRoutesSheet = $Workbook.Worksheets.Item(3)
$PSTNRoutesSheet.Name = "PSTN Routes"
$VoicePolicySheet = $Workbook.Worksheets.Item(4)
$VoicePolicySheet.Name = "Voice Policies"
$TrunkSheet = $Workbook.Worksheets.Item(5)
$TrunkSheet.Name = "Trunk Configuration"
Write-Host "Done"
 
#Configure layout for Location Profile Sheet
Write-Host "**Building Location Profile Sheet**"
$LocationProfilesSheet.Cells.Item(1,1) = "Dial Plan"
$LocationProfilesSheet.Cells.Item(1,2) = "Scope"
$LocationProfilesSheet.Cells.Item(1,3) = "Dial Plan Description"
$LocationProfilesSheet.Cells.Item(1,4) = "Rule"
$LocationProfilesSheet.Cells.Item(1,5) = "Rule Description"
$LocationProfilesSheet.Cells.Item(1,6) = "Pattern"
$LocationProfilesSheet.Cells.Item(1,7) = "Translation"
$LocationProfilesSheet.Cells.Item(1,8) = "Dialin Conferencing Region"
 
$CurrentRow = 2
 
#Import XML data into Excel fields.
$LocationProfiles = @($VCFGXML.Datasource.LocationProfiles.Datasource)
ForEach ($DialPlan in $LocationProfiles){
Write-Host "Found Dial Plan: " $DialPlan.DialPlanName
ForEach ($Rule in $DialPlan.Rules.Datasource){
Write-Host "Importing Rule: " $Rule.Name
$LocationProfilesSheet.Cells.Item($CurrentRow,1) = $DialPlan.Name
$LocationProfilesSheet.Cells.Item($CurrentRow,2) = $DialPlan.Scope
$LocationProfilesSheet.Cells.Item($CurrentRow,3) = $DialPlan.Description
$LocationProfilesSheet.Cells.Item($CurrentRow,4) = $Rule.Name
$LocationProfilesSheet.Cells.Item($CurrentRow,5) = $Rule.Description
$LocationProfilesSheet.Cells.Item($CurrentRow,6) = $Rule.Pattern
$LocationProfilesSheet.Cells.Item($CurrentRow,7) = $Rule.Translation
$LocationProfilesSheet.Cells.Item($CurrentRow,8) = $DialPlan.DialinConferencingRegion
$CurrentRow = $CurrentRow + 1
}
}
Write-Host "**Done with Location Profile Sheet**"
 
#Configure layout for PSTN Usages Sheet
Write-Host "**Building PSTN Usages Sheet**"
$PSTNUsagesSheet.Cells.Item(1,1) = "Name"
$PSTNUsagesSheet.Cells.Item(1,2) = "Identity"
$PSTNUsagesSheet.Cells.Item(1,3) = "Scope"
$CurrentRow = 2
 
#Import XML data into Excel fields.
$PSTNUsages = @($VCFGXML.Datasource.PSTNUsages.Datasource)
ForEach ($Usages in $PSTNUsages){
ForEach ($Usage in $Usages.Usages.Datasource){
Write-Host "Importing Usage: " $Usage.Name
$PSTNUsagesSheet.Cells.Item($CurrentRow,1) = $Usage.Name
$PSTNUsagesSheet.Cells.Item($CurrentRow,2) = $Usages.Identity
$PSTNUsagesSheet.Cells.Item($CurrentRow,3) = $Usages.Scope
$CurrentRow = $CurrentRow + 1
}
}
Write-Host "**Done with PSTN Usages Sheet**"
 
#Configure layout for PSTN Route Settings Sheet
Write-Host "**Building PSTN Route Settings Sheet**"
$PSTNRoutesSheet.Cells.Item(1,1) = "Route Name"
$PSTNRoutesSheet.Cells.Item(1,2) = "Usage"
$PSTNRoutesSheet.Cells.Item(1,3) = "Route Description"
$PSTNRoutesSheet.Cells.Item(1,4) = "Number Pattern"
$PSTNRoutesSheet.Cells.Item(1,5) = "Supress Caller ID"
$PSTNRoutesSheet.Cells.Item(1,6) = "PSTN Gateway"
$CurrentRow = 2
 
#Import XML data into Excel fields.
$RouteSettings = @($VCFGXML.Datasource.PSTNRouteSettings.Datasource)
ForEach ($RouteGroup in $RouteSettings){
ForEach ($Route in $RouteGroup.Routes.Datasource){
Write-Host "Importing Route: " $Route.Name
$PSTNRoutesSheet.Cells.Item($CurrentRow,1) = $Route.Name
$PSTNRoutesSheet.Cells.Item($CurrentRow,3) = $Route.Description
$PSTNRoutesSheet.Cells.Item($CurrentRow,4) = $Route.NumberPattern
$PSTNRoutesSheet.Cells.Item($CurrentRow,5) = $Route.SuppressCallerId
ForEach ($Usage in $Route.Usages.Datasource){
$PSTNRoutesSheet.Cells.Item($CurrentRow,2) = $Usage.Name
}
ForEach ($Gateway in $Route.Gateways.Datasource){
$PSTNRoutesSheet.Cells.Item($CurrentRow,6) = $Gateway.ServiceId
}
$CurrentRow = $CurrentRow + 1
}
}
Write-Host "**Done with PSTN Route Settings Sheet**"
 
#Configure layout for Voice Policies Sheet
Write-Host "**Building Voice Policies Sheet**"
$VoicePolicySheet.Cells.Item(1,1) = "Voice Policy Name"
$VoicePolicySheet.Cells.Item(1,2) = "Description"
$VoicePolicySheet.Cells.Item(1,3) = "Scope"
$VoicePolicySheet.Cells.Item(1,4) = "Usage"
$VoicePolicySheet.Cells.Item(1,5) = "Allow Simultaneous Ring"
$VoicePolicySheet.Cells.Item(1,6) = "Allow Call Forwarding"
$VoicePolicySheet.Cells.Item(1,7) = "Allow PSTN Rerouting"
$VoicePolicySheet.Cells.Item(1,8) = "Enable Delegation"
$VoicePolicySheet.Cells.Item(1,9) = "Enable Team Call"
$VoicePolicySheet.Cells.Item(1,10) = "Enable Call Transfer"
$VoicePolicySheet.Cells.Item(1,11) = "Enable Call Park"
$VoicePolicySheet.Cells.Item(1,12) = "Enable Malicious Call tracing"
$VoicePolicySheet.Cells.Item(1,13) = "Enable Bandwidth Policy Override"
$CurrentRow = 2
 
#Import XML data into Excel fields.
$VoicePolicies = @($VCFGXML.Datasource.VoicePolicies.Datasource)
ForEach ($Policy in $VoicePolicies){
Write-Host "Importing Policies for: " $Policy.Name
ForEach ($Usage in $Policy.Usages.Datasource){
$VoicePolicySheet.Cells.Item($CurrentRow,1) = $Policy.Name
$VoicePolicySheet.Cells.Item($CurrentRow,2) = $Policy.Description
$VoicePolicySheet.Cells.Item($CurrentRow,3) = $Policy.Scope
$VoicePolicySheet.Cells.Item($CurrentRow,4) = $Usage.Name
$VoicePolicySheet.Cells.Item($CurrentRow,5) = $Policy.AllowSimulRing
$VoicePolicySheet.Cells.Item($CurrentRow,6) = $Policy.AllowCallForwarding
$VoicePolicySheet.Cells.Item($CurrentRow,7) = $Policy.AllowPSTNReRouting
$VoicePolicySheet.Cells.Item($CurrentRow,8) = $Policy.EnableDelegation
$VoicePolicySheet.Cells.Item($CurrentRow,9) = $Policy.EnableTeamCall
$VoicePolicySheet.Cells.Item($CurrentRow,10) = $Policy.EnableCallTransfer
$VoicePolicySheet.Cells.Item($CurrentRow,11) = $Policy.EnableCallPark
$VoicePolicySheet.Cells.Item($CurrentRow,12) = $Policy.EnableMaliciousCallTracing
$VoicePolicySheet.Cells.Item($CurrentRow,13) = $Policy.EnableBWPolicyOverride
$CurrentRow = $CurrentRow + 1
}
}
Write-Host "**Done with Voice Policies Sheet**"
 
#Configure layout for Trunks Sheet
Write-Host "**Building Trunk Sheet**"
$TrunkSheet.Cells.Item(1,1) = "Trunk Name"
$TrunkSheet.Cells.Item(1,2) = "Trunk Identity"
$TrunkSheet.Cells.Item(1,3) = "Scope"
$TrunkSheet.Cells.Item(1,4) = "Rule"
$TrunkSheet.Cells.Item(1,5) = "Rule Description"
$TrunkSheet.Cells.Item(1,6) = "Concentrated Topology"
$TrunkSheet.Cells.Item(1,7) = "Enable Bypass"
$TrunkSheet.Cells.Item(1,8) = "Enable Refer Support"
$TrunkSheet.Cells.Item(1,9) = "SRTP Mode"
$TrunkSheet.Cells.Item(1,10) = "Max. Early Dialogs"
$TrunkSheet.Cells.Item(1,11) = "Pattern"
$TrunkSheet.Cells.Item(1,12) = "Translation"
$CurrentRow = 2
 
#Import XML data into Excel fields.
$TrunkGroup = @($VCFGXML.Datasource.Trunks.Datasource)
ForEach ($Trunk in $TrunkGroup){
Write-Host "Found Trunk: " $Trunk.Name
ForEach ($Rule in $Trunk.Rules.Datasource){
Write-Host "Importing Rule: " $Rule.Name
$TrunkSheet.Cells.Item($CurrentRow,1) = $Trunk.Name
$TrunkSheet.Cells.Item($CurrentRow,2) = $Trunk.Identity
$TrunkSheet.Cells.Item($CurrentRow,3) = $Trunk.Scope
$TrunkSheet.Cells.Item($CurrentRow,4) = $Rule.Name
$TrunkSheet.Cells.Item($CurrentRow,5) = $Rule.Description
$TrunkSheet.Cells.Item($CurrentRow,6) = $Trunk.ConcentratedTopology
$TrunkSheet.Cells.Item($CurrentRow,7) = $Trunk.EnableBypass
$TrunkSheet.Cells.Item($CurrentRow,8) = $Trunk.EnableReferSupport
$TrunkSheet.Cells.Item($CurrentRow,9) = $Trunk.SRTPMode
$TrunkSheet.Cells.Item($CurrentRow,10) = $Trunk.MaxEarlyDialogs
$TrunkSheet.Cells.Item($CurrentRow,11) = $Rule.Pattern
$TrunkSheet.Cells.Item($CurrentRow,12) = $Rule.Translation
$CurrentRow = $CurrentRow + 1
}
}
Write-Host "**Done with Voice Policies Sheet**"
 
 
 
 
 
#Make Excel visible to the user.
$ExcelApp.Visible = $True
$Workbook.SaveAs($CurrentDirectory + "\" + $ExcelFileName)
 
#$ExcelApp.Quit()

Now open up a powershell command window and navigate to the directory with the .ps1 file and .vcfg file and run the following command:


.\LyncVCFGConverter.ps1 CustomerA_Lync.vcfg


LyncVoice - PS command


The script will extract the data and create an Excel spreadsheet.  The progress is shown as the script is running:


LyncVoice - PS command execute-markup


Once the script is complete, the Excel spreadsheet will be saved and launched.  You will notice that the spreadsheet is divided into different tabs:


LyncVoice - Excel - markup


Here are some examples from some of the other tabs…


Voice Policies:


LyncVoice - Excel -policies - markup


Trunk Configuration:


LyncVoice - TrunkConfig - markup


Hopefully this will help you out on documenting your Lync Voice configurations!  Again, thanks to Chris Cook for the heavy lifting on the powershell scripts.

Tuesday, May 17, 2011

VirtualBox Audio Issues for Windows 7 Client

I use VirtualBox for my virtualization platform on my laptop (sorry Microsoft).  This allows me to have on-the-go servers for demo and lab purposes easier than any other product.

One of the main products that I use is my lab is Lync server.  VirtualBox has no issues when installing audio drivers for Windows XP clients, but it does not install audio drivers for Windows 7 clients. 

Lync client on Windows 7 shows no Audio Device:

VirtBox - Lync no audio - markup

Of course looking at the Device Manager shows that no audio driver is installed:

VirtBox - Device Manager no Audio - markup

This is a big issue for me since I want to be able to test/demonstrate voice and conferencing within my VM environment. 

You can install the driver manually by downloading and installing the Realtek AC’97 Audio driver found HERE

VirtBox - Device Manager driver

After installing the driver, my Lync client now shows a valid audio device:

VirtBox - Lync with audio - markup

I can now successfully make phone calls within the VirtualBox environment:

VirtBox - Lync call

Hope this helps you out if you are also using these tools.

Monday, May 9, 2011

Office 365 Deployment Readiness Tool Released

The Office 365 team just released the beta version of the Deployment Readiness Tool.  This is designed to scan your AD, Exchange, Lync, and SharePoint environments to determine if you are “ready” for Office 365 and if you are not, give you guidance on steps to remediate issues.

You can download the tool from HERE

After launching the .exe file, the actual information gathering happens in a web browser:

O365DeployKit - Analyzing

Once it is complete, it will categorize the report in to the following sections which gives you quick links to the results:

O365DeployKit - finished

Without killing you with screenshots, I will show some notable sections and results.

Active Directory statistics:

O365DeployKit - AD

Active Directory Federation Services readiness (Note the links to review results and links to Deployment Guide for guidance):

O365DeployKit - ADFS

Rich Client Experience readiness (Note the links to review results and links to Deployment Guide for guidance):

O365DeployKit - Clients

Exchange Online readiness (Note the links to review results and links to Deployment Guide for guidance).  In particular in this example, we have Public Folders that are not supported in Office 365:

O365DeployKit - ExchOnline - markup

Lync Online readiness (Note the links to review results and links to Deployment Guide for guidance):

O365DeployKit - Lync - markup

This tool should help take a lot of the guess work out of potential issues.  You can run this tool today to see where you stand!

Monday, May 2, 2011

On Demand Directory Sync for Office 365

Directory Synchronization from your AD to the cloud is a huge part of either coexisting or homing all of your users in the cloud.  This article is not going to go into the details of installing the Directory Sync tool.  This article will only demonstrate how to determine when your AD was last synced and how to force it to sync.  This may be needed if a change in AD is needed to be immediately reflected in the cloud.

By logging in the 365 online portal and navigating to the “Users” section, you can see how long it has been since the last successful sync with AD.

DirSync - portal user sync - markup

To force synchronization, log into your server that has the Directory Synchronization tool installed.  Open up PowerShell and navigate to C:\Program Files\Microsoft Online Directory Sync.  Then start the Directory Sync Configuration Shell by typing .\DirSyncConfigShell.psc1

DirSync - ps1 file

This will launch the Directory Synchronization Configuration Shell.  Once this is open you can type the following command to force synchronization:

Start-OnlineCoexistenceSync

DirSync - onlinecoexist cmd

After this is done, the online portal will show that synchronization has completed recently.

DirSync - portal finished - markup

Note that all synchronization events can be found in the Application Event Log on the server that the Directory Synchronization Tool is installed.

DirSync - event log

Thursday, April 21, 2011

Lync April 2011 Server and Client Updates Released

The Lync team has released server and client updates for April.  The cumulative update is back…see below.  Here are all the details:

Server Updates (7577.139) – Download – KB2493736

  • Core Components
  • Conferencing Server
  • Web Components Server
  • Standard/Enterprise Edition Server
  • Web Conferencing Server
  • Mediation Server
  • UCMA 3.0 Runtime

Note: Use the cumulative LyncServerUpdateInstaller.exe to install the updates to make sure all needed updates are applied.

Phone Edition Updates

Clients

Group Chat

Monday, April 18, 2011

Office 365 Beta Open to Public

office365logo

Just Announced!  Office 365 Beta has moved from “Limited Beta” status to “Public Beta” status.  This means that anyone can now sign up and test drive Office 365. 

Here are some resources to get you started:

To sign up for the Beta, go HERE

Monday, April 11, 2011

Active Directory Federation Services (ADFS) 2.0 with Office 365: Part 2 – Configuring

In Part 1 of this post, we introduced ADFS 2.0 in relation to Office 365 and discussed environmental requirements in implement. Part 2 will actually cover the configuration and validation steps needed to implement ADFS 2.0 with Office 365. Note: this post is based on the Office 365 Beta for Enterprises.

Assumptions:

  • Domain has been added and verified in the Office 365 Admin portal
  • Directory Sync Tool is installed and configured
  • 2 Windows 2008 R2 servers are built and prepared to install ADFS 2.0
    • Internal ADFS server is joined to the domain
    • Proxy ADFS server is not joined to domain and located in perimeter network
  • Necessary firewall ports are open from the Internet to ADFS Proxy server (port 443)
  • Necessary firewall ports are open from ADFS Proxy server to internal ADFS server (port 443)
  • External DNS record has been implemented for ADFS (our example will use sts.UPNdomain.com)

The following steps are used to prepare the environment:

  1. Add UPN Suffix to AD and configure for each user (this is required if your AD is using a non-routable domain internally like .local or .priv)
    • UPNs used for identity federation can only contain letters, numbers, periods, dashes and underscores.
    • Open AD Domains and Trusts tool
    • Right-click AD Domains and Trusts and click Properties
    • On the UPN suffixes tab, type the alternative UPN suffix for the forest and then click Add
    • UPNSuffix
    • Repeat to add additional UPN suffixes
    • Open user properties, navigate to Account Tab.
    • Select the external namespace UPN for the “User logon name”
    • UPN-Account
  2. Create service account for ADFS – this can be a regular Domain User, no special permissions needed.
  3. Add internal ADFS server(s) to AD forest
  4. Download ADFS 2.0 RTW (HERE). During the install process, the following Windows components will be automatically installed:
    • Windows PowerShell
    • .NET Framework 3.5 SP1
    • Internet Information Services (IIS)
    • Windows Identity Foundation
  5. Download Microsoft Online Services Identity Federation Management Tool (32-bit or 64-bit)
  6. (Optional) Install and configure SQL Server 2005 or 2008 if your organization has more than 30,000 users who will use Office 365
  7. Configure external DNS A record for ADFS Proxy (ex. Sts.domain.com)

Now we are ready to install and configure ADFS 2.0 on internal server:

  1. Double-click AdfsSetup.exe (this is the ADFS 2.0 RTW download)
  2. Click Next on the Welcome Screen and Accept the License Agreement
  3. On the Server Role Option screen, select Federation Server
    • ADFS - Role select - ADFS Server - markup
  4. Finish the rest of the wizard, this will install any necessary prerequisites
  5. At the end of the wizard, uncheck box to Start the ADFS 2.0 Management Snap-in
    • ADFS - install - uncheck box - markup
  6. Request and provision public certificate through IIS
    • ADFS - IIS - cert request - markup
  7. Bind certificate to IIS on port 443
    • ADFS - IIS - bind - markup
  8. Configure ADFS utilizing ADFS 2.0 Management
    • ADFS - start management tool
  9. Select ADFS 2.0 Federation Server Configuration Wizard
    • ADFS - management - wizard start - markup
  10. Select Create a new Federation Service
  11. Select New Federation server farm (this is recommended even if you plan on installing only one server in case in the future you want to add another server)
    • ADFS - management - wizard - farm - markup
  12. Select the public certificate and validate the Federation Service name.  This will automatically fill in the name on the certificate Subject Name.  If a wildcard certificate is used, you must enter the name for the Federation Service.
    • ADFS - management - wizard - name - markup
  13. Enter in the service account credentials that were created earlier
    • ADFS - management - wizard - service account - markup
  14. Finish Wizard
  15. Run Office 365 Desktop Setup from portal
  16. Install Identity Federation Management Tool (FederationConfig.msi, use default install parameters)
  17. Enable Identity Federation within Office 365 portal for your domain
  18. Launch the Identity Federation Management Tool
  19. Type $cred=Get-Credential and press Enter
  20. Enter you Microsoft Online Services administrator logon and password and click ok
    • ADFS - Fed tool - creds - markup
  21. Type Set-MSOLContextcredential –msolAdminCredentials $cred –LogFile c:\logfile.log and press enter
  22. Type Add-MSOLFederatedDomain –domainname UPNdomain.com
  23. If prompted that the domain already exists as a standard domain, type Convert-MSOLDomainToFederated –domainname UPNdomain.com
  24. Type Update-MSOLFederatedDomain –domainname UPNdomain.com
  25. Verify Identity Federation Functionality

Install ADFS 2.0 Proxy server

  1. Export public certificate from ADFS internal server and copy to proxy server
  2. Validate DNS resolution of sts.UPNdomain.com resolves to internal ADFS server from ADFS Proxy Server (a HOST file can be used for this if needed)
  3. Validate DNS resolution of sts.UPNdomain.com resolves to external A record from an internet PC
  4. Double-click AdfsSetup.exe (this is the ADFS 2.0 RTW download)
  5. Click Next on the Welcome Screen and Accept the License Agreement
  6. On the Server Role Option screen, select Federation Server Proxy
    • ADFS - Role select - ADFS Proxy Server - markup
  7. Finish the rest of the wizard, this will install any necessary prerequisites
  8. At the end of the wizard, uncheck box to Start the ADFS 2.0 Management Snap-in
    • ADFS - install - uncheck box - markup
  9. Import certificate in IIS and bind certificate to Default Web Site
  10. Configure ADFS proxy by selecting ADFS 2.0 Federation Server Proxy Configuration Wizard
    • Enter the federation namespace (ex. Sts.UPNdomain.com)
    • Test connection
    • adfs - proxy - wiz - test conn - markup
    • Service account credentials
  11. Finish Wizard
  12. Log into portal with UPN credentials.  Note that once the UPN login is entered, the password field is grayed out and a link activates to log into the ADFS server
    • ADFS - portal - signin - markup

Hopefully this will help you navigate the ADFS waters in regards to Office 365 Beta.