msunified.net

Technical blog about Exchange, OCS and Lync by Ståle Hansen

Lync Server and PowerShell – My favourite features, oneliners and scripts

Posted by Ståle Hansen on 18/01/2012

I was preparing to speak at Microsoft Technology User Group (MTUG) here in Norway at the PowerShell Script Club. My session for the night was going to be Lync Server Management Shell. First I thought I was not going to prepare anything and wing the whole session. The more I thought about it, winging any session that I am going to give in front of an audience is seldom a good idea. So I thought, ok make a blog post instead. I will here add my favourite features, oneliners and scripts that I have found working with Lync Server. I will update this blogpost as I remember and find new features, oneliners and scripts. Please let me know of your best PowerShell tricks in Lync.

Last updated 17.01.2012

Connecting

In addition to log on the Lync Server and open Lync Server Management Shell you can also access and work with Lync through remote PowerShell which came available in V2. Here is what you need to connect. The url could be your external webservices url as well

$session = New-PSSession -ConnectionUri https://lync-admin.contoso.local/OcsPowershell -Credential (Get-Credential)
Import-PSSession -Session $session

Finding cmdlets

There are several ways to find cmdlets in Lync. If you like the graphical representation like a mind map there is some good ones created by MVP Tom Arbuthnot

In PowerShell there is some cmdlets available as well when finding what is available

#Get all cmdlets for Lync that contains -Cs
Get-Command *-Cs* -CommandType cmdlet -Module Lync
#Get all cmdlets that contains user
Get-Command *user* -CommandType cmdlet -Module Lync

#When you find the cmdlet you want to use find the syntax on how to use it
Get-Help Get-CsUser -Examples
#Use -Online to open the TechNet website for that cmdlet
Get-Help Get-CsUser -Online

#Looking for a specific setting to set and don't know which cmdlet that can modify it use the below code
$params = Get-Command -CommandType Cmdlet *-Cs* | % { $n = $_.Name ; $_.Parameters.Values | % { Add-Member -in $_ noteproperty CmdletName $n; $_ } }
$params | where { $_.Name -like "*meeting*" } | select Name,CmdletName
#This is cool, found the trick over at http://blogs.technet.com/b/csps/archive/2010/06/14/howtofindsetting.aspx

Cmdlets

There are some cmdlets I use more than others and find useful. Let me know what is your most used cmdlets.

#List a lot of the topology information, here you can sort to find URLs, ports and servernames configured
Get-CsService

#List all pools in your topology, useful for finding Front End pool name, when you forget it
Get-CsPool

#The only policy that is not available in Lync Control Panel, lot of nice features can be configured here
Get-CsClientPolicy

#Update the AddressBook files
Update-CsAddressBook

#List the CMS replication status for each Lync Server
Get-CsManagementStoreReplicationStatus

Oneliners

The most used oneliners that I use

#Find what Lync Services are running
Get-CsWindowsService -ExcludeActivityLevel | ft Name, Status
#Start any stopped services
Get-CsWindowsService -ExcludeActivityLevel | where {$_.Status -like "Stopped"} | Start-CsWindowsService

#Find all users that are enabled for Lync and have a LineUri, sort them by LineUri, display displayname and LineUri
Get-CsUser -Filter {LineURI -ne $Null} | sort -Property LineURI | ft DisplayName,LineURI

#Quickly find and open the share folder for the Lync pool
Invoke-Item(Get-CsService -FileStore | Select-Object -ExpandProperty UncPath)

Scripts

There are a lot of scripts that is created and expand on Lync Server PowerShell functionality and and some that simplifies working with Lync as well as monitors the solution. Below are some of my favourite scripts. Please let me know of other epic scripts out there.

Set-Lync2010Features.ps1

A script to install prerequisites on Server 2008 R2 before you start install Lync Server on the OS.  You can download the resource kit tools, Silverlitght and other tools easily. You even have som post deployment options in the script as well. This script is highly recommended and I use it in every deployment.

List-UnusedNumbers.ps1

A scripts that read unassigned numbers and depends on you having put you entire number serie there. It will find all numbers assigned to users, devices and features in Lync and find what numbers are available in any given unassigned numbers series. This is a script that saves you the pain of managing available numbers in an excel sheet.

Set-GlobalVoiceRouting.ps1

This script is for demo or initial deployments only. It is created for norwegian rules and genereates an easy way to dial out through one gateway and has the usual normalization rules for Norway. To edit the script and find the nomralization rules for your country see the Dialing Rule Optimizer.

Reset-UserPolicies.ps1

This script is used in an OCS to Lync migration scenario. It will reset all policies to $Null so that they use Global or Pool level policies for External access, Voice Policy and so on. The reason for this is that all users should use what you define for Lync and not what you inherit from OCS.

Get-CsConnections.ps1

This script lists user connections, client versions and the distribution of users in a load balanced scenario

Monitoring OCS and Lync Peak Call Capacity

Script to monitor how many concurrent calls a particular OCS or Lync Mediation Server is handling. The script grabs the counters for inboud and outbound calls, parses their values, adds them together, and dumps the output into a CSV file. A good tool to find how many concurrent calls you have on your deployment

Update-AdPhoto.ps1

A script that enables you to import AD photos from file and store it in the thumbnailPhoto attribute. It is a central feature in Lync to show a photo of users

New-SipContact.ps1

A script to enable users to search for external contacts and Video Conferencing endpoints from Lync. It creates a contact in AD and adds the SIP address to the msRTCSIP-PrimaryUserAddress so it will be synced to the addressbook in Lync.

Scripting Tips

There is a lot of techniques used for scripting. The best script tips I know of I will list here.

Use Write-Debug

Lets you easilly define debug lines that can test variables and logic in you script that is good to use when developing the script but that not need to be there when it is used in production. When you want to debug the script you change the $DebugPreference from ‘SilentlyContinue’ to ‘Continue’. Then all Write-Debug lines will be displayed.

$DebugPreference = 'Continue'

$var = Read-Host "Enter a computer name"
Write-Debug “’$var’ contains $var“

$DebugPreference = 'SilentlyContinue'

Use Functions

Functions are scripts in scripts. If it is certain things you need to do more than once in you script, make it a function with an input and output. I have also seen functions being used to organize your script in a better way to make it easier and more ordered to view.

Function Do-Something ($computername,$domainname) {
	# function code goes here
}

Resources

The Official Lync PowerShell Blog: http://blogs.technet.com/b/csps/p/categories.aspx
The Official Lync PowerShell Blog Cmdlet Descriptions: http://blogs.technet.com/b/csps/archive/2010/07/16/refallcmdlets.aspx
MVP Pat Richard’s Blog: http://www.ehloworld.com/category/powershell

http://seg.sharethis.com/getSegment.php?purl=http%3A%2F%2Fstalehansen.wordpress.com%2Fwp-admin%2Fpost.php%3Fpost%3D3129%26action%3Dedit&jsref=&rnd=1326893321249

Posted in Lync Server 2010 | Tagged: , | 2 Comments »

Slides and videos from my Lync sessions on NIC2012 are now available

Posted by Ståle Hansen on 16/01/2012

This year Nordic Infrastructure Conference (NIC) arranged for the first time. I am really honored to be considered to speak at an international conference and together with so many great speakers that I look up to. Speakers like Brian Komar, Johan Arwidmark, Martin Lidholm, Olav Tvedt, Thomas Lee and many others attended and I enjoyed their sessions. See list of speakers here: http://www.nic2012.com/nic2012_agenda/speakers. My sessions where about Lync Server 2010 troubleshooting and integrations. I enjoyed speaking there even though my spoken english is not the best, I think I got the points accross :) View the videos from NIC: http://www.nic2012.com/nic2012_agenda

Lync Server 2010 Troubleshooting

The goal of this session is to help you understand what troubleshooting tools that are at your disposal and will show them in an actual scenario. When troubleshooting a solution as Lync Server 2010 it is smart to know how things work as well. Therefore this session will also touch upon how the Lync SIP server works and what the Lync Edge server actually is.

View the video and download the slides

Lync Server 2010 Integrations

This session will take a look at all the differente integrations with Lync Server 2010 and how they play out. Expect to get a good overview of the possibilities available to enhance the experience of Lync. This session will not contain that many demos but will focus on pros and cons with the different types of integrations.

View the video and download the slides

Also take a look at the other Lync sessions by Martin Lidholm

I also did a Flash Talk at the Microsoft Booth demonstrating how to roll out Custom Presence States using Set-CsClientPolicy and also how to set it in registry

Posted in UCC | Tagged: , , | 4 Comments »

Virtual Technical Solution Professional (V-TSP) at Microsoft Norway

Posted by Ståle Hansen on 02/01/2012

In january 2012 I became a Virtual Technical Solution Professional (V-TSP) at Microsoft Norway. Virtual means that I am still employed by Atea but work closely with the local Microsoft team.

My role as a V-TSP is to provide technology overviews, proofs-of-concept, technical demonstrations, and technology assessments for Microsoft customers. The V-TSP program demands that the partner have the gold competency and that the provided resource is highly skilled and certified within the area of expertise.

I am really looking forward to work even more closely with Microsoft and make sure their customers implement Microsoft Lync and the Unfied Communications proftfolio to the fullest by combining the broad best-of-breed UC technologies from Atea together with Microsoft.

Here is some information I found regarding the V-TSP program

The Microsoft Virtual Technology Specialist Program (V-TSP) is a select group chosen from the elite in Microsoft’s partner community, whose focus is to augment Microsoft’s internal Technology Specialist team. Their primary role is to communicate the value of Microsoft Solutions to customers and to provide architectural guidance for Enterprise Integration solutions. The Microsoft V-TSP program was designed to create a deeper relationship with Microsoft Partners, the Product Teams at Microsoft Corporate, and Regional Microsoft Offices, in order to provide highly skilled solution specialists to Microsoft customers. It is designed to enable a high performance team of partner-based resources to deliver pre-sale activities and resources to empower customers and help them meet their solution and integration needs.

V-TSPs are chosen by Microsoft because of their superior architectural, development, consulting, and customer interfacing skills. Microsoft utilizes these type of individuals in partnership with the Microsoft regional Offices, in pre-sales efforts to secure Microsoft solution opportunities. This includes meeting with Microsoft customers, participating in customer visits with Microsoft representatives, as well as, participating in broad reach events like presenting training and seminars to Microsoft customers.

Microsoft V-TSPs have direct access to online resources and documentation and resources that are usually solely reserved for the Microsoft internal teams. They also have early access to extensive information about all new Microsoft product releases, which benefit Atea and Microsoft customers.

Posted in UCC | Tagged: , , | Leave a Comment »

Lync Server Mobility Troubleshooting Tips

Posted by Ståle Hansen on 23/12/2011

The Lync Mobility service and the Lync Clients was released 13.12.2011. Since then as we get more hands-on with the service there are in some cases trouble getting the it up and running. This post is dedicated to how you can test and troubleshoot the mobility service deployment. I will update this post when I find more information on how to troubleshoot and how to solve certain scenarios.

Last updated: 18.01.2012

Deployment

If you have a multi-homed Front End server the Mobility Service (Mcx) may sometimes fail

  • Reason: When calculating routing for a Mobility request the service makes a call to read DNS settings of the registered adapter. In some instances it is possible for the non-registered adapter to be returned.
  • This causes routing of the request to fail This is regardless subnet configuration on the second NIC
  • There should be a forthcoming Release Note or KB Article on this topic

Make sure you have deployed the solution correct by following one of these guides created by myself and fellow MVP’s Jeff Schertz and Adam Jacobs.

Testing

To validate the installation and configuration on the server side before you involve clients use the following techniques

To check that Autodiscover is working as expected, check the Autodiscover urls in a webbrowser

  • Get-CsService -WebServer | fl  autodiscover* to find the urls
  • Example: https://<Webservices URL>/autodiscover/autodiscoverservice.svc/root
    • Note: Make sure you don’t have “/” after root, because then you just get a “Endpoint Not Found” page
  • You should get to download the root file stating the following: {“AccessLocation”:”External”,”Root”:{“Links”:[{"href":"https...... and so on pointing to your Webservices URL

To check  that the mobility service is working use the following url

  • https://<FE pool FQDN>/mcx/mcxservice.svc

You can test the Push Notificaton Service using the following cmdlet where sip.sipdomain.com is you AccessEdgeFQDN

  • Test-CsFederatedPartner –TargetFqdn <AccessEdgeinternalFqdn> –Domain push.lync.com –ProxyFqdn sipfed.online.lync.com
  • Test-CsMcxPushNotification -AccessEdgeFqdn <AccessEdgeinternalFqdn>
    • NOTE: you may get a 30008 error when running Test-CsMcxPushNotification, but it is working anyway

You can test the Mobility Service using the following script, at this time it does not work with preconfigured CsHealthMonitoringConfiguration

$passwd1 = ConvertTo-SecureString "Password01" -AsPlainText -Force
$passwd2 = ConvertTo-SecureString "Password02" -AsPlainText -Force
$tuc1 = New-Object Management.Automation.PSCredential("contoso\UserName1", $passwd1)
$tuc2 = New-Object Management.Automation.PSCredential("contoso\UserName2", $passwd2)
Test-CsMcxP2PIM -TargetFqdn pool01.contoso.com -SenderSipAddress sip:UserName1@contoso.com -SenderCredential $tuc1 -ReceiverSipAddress sip:UserName2@contoso.com -ReceiverCredential $tuc2 –v

Troubleshooting

Microsoft has released CU4 release notes with known issues for Lync Mobile and workarounds. I have listed some of the most important issues here

  • Issues with switching between Wi-Fi and 3G with Lync Mobile for Windows Phone. Resolution: Exit Lync Mobile and start Internet Explorer to reestablish network connectivity
  • Lync might not connect to an IM conversation from push notification on Lync 2010 for Windows Phone. Resolution: Conversation must be reestablished because of timeout or the conversation was answered on another device
  • In iOS, not all Lync meetings show up as Lync meetings. Resolution: Expected behavior when the meeting is scheduled by copying the Lync Online link, created in webaccess or created by Lync Online user that is not enabled for the audio conferencing provider (ACP)
  • Push notification over a Wi-Fi network requires that firewall UDP port 5223 is open for incoming HTTP traffic. Resolution: This is because of Apple Push Notification service requires it

Download the release notes here: http://www.microsoft.com/download/en/details.aspx?id=28549

Other issues that may occur and are described by Microsoft

I have seen an issue where Call via Work does not work. When you use Call via Work Lync will dial the phone number you have specified only to get disconnected when

Symptoms

  • When you use Call via Work Lync will dial the phone number you have specified only to get disconnected when you try to answer the call
  • In the Lync server SIP logs you see a 603 Decline message from the SIP Trunk GW

Resolution

  • Use Lync Server Management Shell to verify that Get-CsTrunkConfiguration | fl EnableReferSupport is set to True
  • If it is you can try to set it to false
  • Set-CsTrunkConfiguration -EnableReferSupport $False
  • Now try the Call via Work feature and it should work
  • The reason for this is that the SIP Trunk provider is not configured to support SIP REFER

You may have the problem with users not being able to sign in. Make sure the following is true

  • Go through the logs from the sign in process, Lync Mobile has the ability to send diagnostic logs from the client to the administrator
  • Lyncdiscover is a CNAME pointing to Web Services URL found using Get-CsService -WebServer | ft ABHandlerExternalUri
  • The certificate on the ISA/TMG is updated with the Lyncdiscover.domain.com SAN
  • If it is over Wi-Fi and users connect internally the clients must trust the Root certificate used on the Front End server
  • If you are using port 80 make sure you are using a separate publishing rule, listener is configured for 80->8080 and no authentication and clients can not authenticate is set
  • The Lync Mobile client can’t sign in and you get a 401 unauthorized in the logs, may be due to multiple NIC’s on the FE: http://www.lync-blog.nl/?p=596&lang=en
  • The Lync Mobile client can’t sign in when you publish LoadBalanced FE using TMG Web farm for the web services, try switching your TMG persistence to source IP: http://www.confusedamused.com/notebook/lync-mobile-clients-and-tmg-server-farms/

Troubleshooting articles

A good Lync Mobile troubleshooting story by flinchbot: http://flinchbot.wordpress.com/2011/12/12/troubleshooting-tips-for-lync-mobility/
Lync 2010 Mobility Sign-in Process: http://blog.kloud.com.au/2011/12/12/lync-2010-mobility-sign-in-internals/
Windows Phone 7 mobile devices: use and troubleshooting: http://support.microsoft.com/kb/2636318
Google Android mobile devices: use and troubleshooting: http://support.microsoft.com/kb/2636313
Apple iPhone and iPad mobile devices: use and troubleshooting: http://support.microsoft.com/kb/2636320
Lync Online Troubleshooting “Cannot connect to the server” errors on Lync mobile devices: http://support.microsoft.com/kb/2636329
Lync Mobility – Understanding SIP Sign-in Address vs. User Principle Name (UPN): http://blogs.pointbridge.com/Blogs/Crockett_keenan/Pages/Post.aspx?_ID=14

Posted in Lync Server 2010 | Tagged: , , , | 16 Comments »

Using Lync Mobile with Office 365 and Lync Online

Posted by Ståle Hansen on 12/12/2011

Now that the Lync Mobile Client is released it is important to enable your Office 365 Lync Online domain to support these clients. This blog post will specify what you need to do

Lync Mobile features

Lync mobile client is released for Windows Phone 7, iPhone, iPad, Android and later on Nokia (Symbian). The feature set is about the same accross the platforms. There is no ability to view meeting content, video or do voice over IP. The main features is therefore

  • IM and presence
  • One Click join meetings (Requires audio conferencing provider)
  • View contacts

For a detailed feature list see the TechNet article: http://technet.microsoft.com/en-us/library/hh691004.aspx

Enable your domain for Lync Mobile automatic discovery

When using Lync Mobile over WiFi make sure you check the following

  • Open outbound port in firewall to TCP 5223 for Apple push notification
  • If you firewall proxy settings blocks SRV queries add
  • CNAME with your domain called lyncdiscover.yourdomain.com and point it to webdir.online.lync.com to your internal DNS

Thats is. Should be a simple process. In order for this to work you need to have published the Lync Online service as depicted in this kb article: http://support.microsoft.com/kb/2566790

References

Set up Lync mobile devices: http://community.office365.com/en-us/w/lync/1040.aspx
Deploying Lync Mobile Clients: http://technet.microsoft.com/en-us/library/hh691005.aspx
Ensuring Your Network Works With Lync Online: http://community.office365.com/en-us/w/lync/ensuring-your-network-works-with-lync-online.aspx

Posted in Office 365 | Tagged: , | 3 Comments »

Enabling Lync Server 2010 for Lync Mobile Clients

Posted by Ståle Hansen on 12/12/2011

As the Lync mobile clients are released so are the server side setup notes. This article will go through the steps for setting up your environment and make it ready for the Lync mobile clients.

Note: This post will be updated as the Lync community get more hands on with the service. Last update 23.12.2011

Lync Mobile features

Lync mobile client is released for Windows Phone 7, iPhone, iPad, Android and later on Nokia (Symbian). The feature set is about the same accross the platforms. There is no ability to view meeting content, video or do voice over IP. The main features is therefore

  • IM and presence
  • One Click join meetings
  • Call via work

For a detailed feature list see the TechNet article: http://technet.microsoft.com/en-us/library/hh691004.aspx

Planning for Lync Mobility

If you have a multi-homed Front End server the Mobility Service (Mcx) may sometimes fail

  • Reason: When calculating routing for a Mobility request the service makes a call to read DNS settings of the registered adapter. In some instances it is possible for the non-registered adapter to be returned.
  • This causes routing of the request to fail This is regardless subnet configuration on the second NIC
  • There should be a forthcoming Release Note or KB Article on this topic

If you use a Director it must be updated the same way as for a Front End

If you plan to support Lync Mobility and Push Notifications over a Wi-Fi you need to

Prerequisites

This Lync Mobility guide requires that your Lync solution is deployed with Lync Edge server and Reverse Proxy. This guide will only talk about Lync Mobility specific configuration

Install CU4 (November release) or later in you Lync infrastructure: http://go.microsoft.com/fwlink/?LinkID=208564.

IIS 7.5 is recommended because of some high load request limitations

If you use Hardware Load Balancer

  • You must ensure that cookie-based persistence on a per port basis for external ports 4443 and 8080 on the hardware load balancer is configured
  • For Lync Server 2010 it is important to use cookie-based persistence so that multiple connections from a single client are sent to one server to maintain session state
  • For details on how to configure, see Load Balancing Requirements.

Install the IIS feature Dynamic Content Compression (Web-Dyn-Compression) on all involved Front End servers

  • Server 2008: ServerManagerCMD.exe –Install Web-Dyn-Compression
  • Server 2008 R2: Import-Module ServerManager; Add-WindowsFeature Web-Dyn-Compression

Enabling Lync Mobility

Configure Lync Mobility Autodiscover CNAME DNS records

  • Internal: lyncdiscoverinternal.sipdomain.com
  • External: lyncdiscover.sipdomain.com
    • Point it to your Reverse Proxy FQDN if using SSL or a new publishing rule and IP if you are using port 80
    • To find you reverse proxy FQDN use this PowerShell oneliner on your Front End server
      • Get-CsService -WebServer | ft ABHandlerExternalUri

Configure listening ports for the Mobility Service (Mcx)

  • Verify that your server version is correct by running PowerShell cmdlet: Get-CsServerVersion
    • Version should be 4.0.7577.0 or newer
  • In PowerShell run the following cmdlet for internal and external listening port
    • Set-CsWebServer –Identity <internal FE Pool FQDN> -McxSipPrimaryListeningPort 5086 -McxSipExternalListeningPort 5087
  • Publish the updates to the CMS database
    • Enable-CsTopology –verbose

Download and enable the Lync Mobility

  • Do not install, but download the McxStandalone.msi and place it in the following folder on all Front End servers and Directors
  • Run the Lync Server Deployment wizard, found under Administrative tools-> Lync Server
    • In the wizard click Install or update Lync Server System
    • Choose Step 2: Setup or Remove Lync Server components
    • This will reconfigure the Lync Services on the Front End with the new listening ports
  • Verify that the server is configured correct, open IIS and check for Autodiscover and Mcx Vdirs

Update certificates on Front End and Edge/TMG

  • Still in the Lync Server Deployment Wizard choose step 3: Request, Install or Assign Certificates
  • You need to request a new certificate with the new name, make sure you get all additional SAN entries from the old certificate
  • If you use the same certificate on all Front End services you can use this PS onliner to get a list of your certificates SAN’s
    • On FE: Get-CsCertificate -Type default | Select-Object -ExpandProperty AlternativeNames
  • If you use the same certificate on Edge and TMG you can run the below command to get all SAN’s
    • On Edge: Get-CsCertificate -Type DataEdgeExternal | Select-Object -ExpandProperty AlternativeNames
  • To reissue the certificates using PowerShell see Ari Protheroe’s blog post: http://ariprotheroe.wordpress.com/2011/12/10/reissuing-certificates-for-lync-mobile/

Configuring Push Notification

  • Push Notification is used by the Mobility Service to send notifications to Apple and Microsoft phones that has the Lync application running in the background to wake them up
  • To enable push notification run the following cmdlet:
    • Set-CsPushNotificationConfiguration -EnableApplePushNotificationService $True -EnableMicrosoftPushNotificationService $True
  • You need to enable federation with Office365 as a hosted provider if you have not already done so
    • New-CsHostingProvider -Identity ”LyncOnline” -Enabled $True -ProxyFqdn ”sipfed.online.lync.com” -VerificationLevel UseSourceVerification
  • You then need to set up a hosting proivder between your organization and the Push Notification Service at Lync Online
    • New-CsAllowedDomain -Identity “push.lync.com”

Publishing externally

There is two possibilities when publishing Lync Mobility through a reverse proxy

  • Publish through port 80 using the same IP as your existing Lync publishing rule
    • Pros: you don’t have to update on your reverse proxy certificate with an extra SAN name
    • Cons: you need to open port 80->8080 on a new rule and it is not recommende to do this by Microsoft
    • Result: discovery information for you Lync mobile clients will get information about logon server unencrypted, the rest is encrypted the usual way
  • Publish through port 443 using the same IP as your existing Lync publishing rule
    • Pros: All traffic will be encrypted, you just need to add lyncdiscover.sipdomain.com to public name on the publishing rule
    • Cons: You need to add an extra SAN name for lyncdiscover.sipdomain.com on your reverse proxy certificate
    • Result: all traffic are encrypted
  • Take a look at Adam Jacobs blogpost at the bottom for how to create a new rule

Testing and Troubleshooting

I have written a blogpost on how to test and troubleshoot Lync Mobile and Mobility here: Lync Server Mobility Troubleshooting Tips: http://msunified.net/2011/12/23/lync-server-mobility-troubleshooting-tips/

How to test the services

You can test that the services are working correct by accessing some URLs

To check that Autodiscover is working as expected, check the Autodiscover urls in a webbrowser

  • Get-CsService -WebServer | fl  autodiscover* to find the urls
  • Example: https://<Webservices URL>/autodiscover/autodiscoverservice.svc/root/

To check  that the mobility service is working use the following url

  • https://<FE pool FQDN>/mcx/mcxservice.svc

You can test the Push Notificaton Service using the following cmdlet where sip.sipdomain.com is you AccessEdgeFQDN

  • Test-CsFederatedPartner –TargetFqdn <internal edge fqdn> –Domain push.lync.com –ProxyFqdn sipfed.online.lync.com
  • Test-CsMcxPushNotification –AccessEdgeFqdn <internal edge fqdn>
  • NOTE: you may get a 30008 error when running Test-CsMcxPushNotification, but it is working anyway

You can test the Mobility Service using the following script, at this time it does not work with preconfigured CsHealthMonitoringConfiguration

$passwd1 = ConvertTo-SecureString "Password01" -AsPlainText -Force $passwd2 = ConvertTo-SecureString "Password02" -AsPlainText -Force
$tuc1 = New-Object Management.Automation.PSCredential("contoso\UserName1", $passwd1)
$tuc2 = New-Object Management.Automation.PSCredential("contoso\UserName2", $passwd2)
Test-CsMcxP2PIM -TargetFqdn pool01.contoso.com -SenderSipAddress sip:UserName1@contoso.com -SenderCredential $tuc1 -ReceiverSipAddress sip:UserName2@contoso.com -ReceiverCredential $tuc2 –v

Monitoring the Mobility Performance

There are several places you can monitor Mobility, here from TechNet:

References

MVP Adam Jacob’s blog: http://imaucblog.com/archive/2011/12/09/step-by-step-microsoft-lync-2010-lync-mobility-mcx-installation-guide/
Ben Lee’s blog: https://www.bibble-it.com/2011/12/10/configuring-lync-mobility-part-1
MVP Jeff Schertz’s blog: http://blog.schertz.name/2011/12/deploying-the-lync-2010-mobility-service/
Lync Server Mobility Troubleshooting Tips: http://msunified.net/2011/12/23/lync-server-mobility-troubleshooting-tips/
Microsoft Lync Server 2010 Mobility Guide: http://www.microsoft.com/download/en/details.aspx?id=28355
Planning for Mobility: http://go.microsoft.com/fwlink/?LinkId=235303
Deploying Mobility: http://go.microsoft.com/fwlink/?LinkId=235304
Monitoring Mobility for Performance: http://go.microsoft.com/fwlink/?LinkId=235305

Posted in Lync Server 2010 | Tagged: , , , , , | 36 Comments »

Want to work with Lync and Exchange and be a part of the best UC team in Norway?

Posted by Ståle Hansen on 12/11/2011

Microsoft Lync and Microsoft Exchange consultants from Atea are in big demand these days and we need to add more skillful hands. In Norway Atea seeks consultants, architects and advisors that want to work with Lync and Exchange in the Oslo area, Drammen area and Bodø area

Why work with Lync and Exchange in Atea?

  • Atea strive to always deliver best practice deployments
  • There are about thirty active consultants with Lync and Exchange as their primary focus placed all over the country
  • Some of the consultants have worked with Microsoft UC as their primary focus since Live Communications Server 2005
  • We have an active internal community that share knowledge internally using SharePoint 2010 and strive to help each other as best we can
  • Atea encourage consultants to be active within the global Microsoft community through forums, blogging, presenting and user groups

Who should apply?

  • You want to deep dive and focus on becoming a valuable resource within Lync and Exchange
  • You are always looking for new challenges and want to work with a variety of deployments from simple to complex
  • You want to learn from some of the best Lync consultants in Norway
  • You aim for Certified Master within Lync or Exchange
  • You are familiar with PowerShell scripting

Where to apply?

Why is Atea the best UC team in Norway?

Posted in UCC | Tagged: , | Leave a Comment »

Lync AddressBook Process stops and starts every two minutes with Event ID 12330

Posted by Ståle Hansen on 04/11/2011

At a customer site I got EventID 12330 LS Server stating that abserver worker process failed to initialize itself. A quick google search lead me to this forum article:http://social.technet.microsoft.com/Forums/en-US/ocsaddressbook/thread/6365091e-ec34-46cc-b9f7-e362b9084bb3

There MVP colleague Johan Veldhuis found a cause of this problem. The cause was that the SQL database being backed up when the Addressbook was being generated resulting in low responce time and therefore the process did not complete its update. The addressbook is being generated at 01.30 default every night, and if it can not update we will see this kind of behaviour

Resolution

  • Use the Set-CsAddressBookConfiguration cmdlet to change the generation time
  • Set-CsAddressBookConfiguration -RunTimeOfDay 23:00
  • This will set the addressbook update to happen at 11 in the night to ensure no SQL backup overlap

Detailed error messages

Event ID 12330    LS Server

Failed starting a worker process.

Process: ‘C:\Program Files\Microsoft Lync Server 2010\Server\Core\ABServer.exe’  Exit Code: C3E8302D!_HRX! (The worker process failed to initialize itself in the maximum allowable time.!_HRM!).
Cause: This could happen due to low resource conditions or insufficient privileges.
Resolution:
Try restarting the server. If the problem persists contact Product Support Services.

Event ID 12331

Worker process exited prematurely.  The process will be automatically restarted.

Process: ‘C:\Program Files\Microsoft Lync Server 2010\Server\Core\ABServer.exe’  Exit Code: 0!_HRX! (The operation completed successfully.
!_HRM!)

Posted in Lync Server 2010 | Tagged: , , | 2 Comments »

Slides and interview from TechDays Norway 2011 is now available online

Posted by Ståle Hansen on 03/10/2011

September 7 2011 I had the honour to attend and speak at TechDays Norway 2011. My sessions where about Office 365 and more specific Exchange Online and Lync Online. The slides and interview is in Norwegian.

Check out the interview with key messages from my sessions

Head over to the TechDaysNorge YouTube channel to see all interviews from the event http://www.youtube.com/user/TechDaysNorge

Office 365: Exchange Online

Office 365: Lync Online

  • What is Lync Online
  • Online vs On-premise
  • Lync Online federation
  • Don’t forget what makes Lync work
  • Download slides as PDF

Posted in Office 365 | Tagged: , , | Leave a Comment »

Change the default Calendar AccessRight on all mailboxes to Reviewer

Posted by Ståle Hansen on 30/09/2011

Back in july 2010 I created a script to set the default AccessRight to Reviewer for Exchange 2010. This was a new feature for Exchange 2010 that we could use the command Set-MailboxFoldersPermission to change AccessRights on specific folders on the server level. As the calendar is a folder we now could do this organization wide using PowerShell.

The reason for creating this script is when migrating customers in Norway most of them want to allow everyone to use side by side calendaring in Outlook and Oulook Web App. In Exchange 2003/2007 we needed to instruct users how to set Default to Reviewer. This script sets it for all users. The script works for both Exchange Online and Exchange Server 2010. For Exchange 2007 check out this post on how to do it: http://exchangeshare.wordpress.com/2008/05/27/faq-give-calendar-read-permission-on-all-mailboxes-pfdavadmin/

Get the script here: http://msunified.net/exchange-downloads/script-set-calendarpermissions-ps1/

What the script does

As the picture shows you get three menu items.

  1. Will set the permission on all users and resources
  2. Will set the permission on all users and reources created the last 30 days
  3. Will give a user you specify Editor access to a mailbox you specify
    • This is good for switchboard or secretary functions

How to run the script against an Exchange Online environment

  • Connect to Exchange Online through PowerShell Remoting

$cred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $Session

  • Set Execution Policy to unrestricted

Set-ExecutionPolicy Unrestricted

  • Run the script by copying the script, saving it as a ps1 file, navigate to it in PowerShell and start typing set-Cal and hit TAB to use TAB completion

.\Set-CalendarPremissions.ps1

Resources

Administering Microsoft Office 365 using Windows PowerShell: http://blog.powershell.no/2011/05/09/administering-microsoft-office-365-using-windows-powershell/

Posted in Exchange 2010, Office 365 | Tagged: , , , | 1 Comment »

 
Follow

Get every new post delivered to your Inbox.