Browsing the archives for the PowerShell tag.

How to Create a Global Idle Policy with a Management Shell Script

Microsoft Lync, Reference, lync server 2010

Lots of questions coming in this month! If you’ve sent one in, don’t worry, we’ll get back to you. (I know we’re testing some changes in our local Lync Server, before we respond to one of them.)

Last week we received this question:

“Can we set up a global policy so everyone has a 5-minute idle in Lync?”

The answer to this question is yes – and no.

Right now, you can’t use a GPO (Group Policy Object) to set a Lync 2010 client’s default idle limit – when Lync switches from Available to Away.

You could go around changing each client’s idle settings, of course. But that’s way too time-consuming (and no self-respecting sysadmin would work that slow).

Don’t worry though! There IS a way to enforce a default idle for Lync users: Use a Management Shell script.

Run a Script at Startup to Set Global Idle

That’s right. One simple script will enforce global idle limits on all clients.

In a moment I’ll show you the script. But before that, a quick reminder: the Lync Server Management Shell isn’t set to run scripts by default! You’ll have to modify the execution policy so you can run scripts.

Which is easy. Just enter this command in the Management Shell prompt:
Set-ExecutionPolicy RemoteSigned

With that done, let’s move to the script itself. Copy the following into Notepad and save it as “set-global-idle.ps1″.


$computer = "."
$registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("CurrentUser", $computer)
$key = $registry.OpenSubKey("SOFTWARE\Microsoft\Communicator", $True)
$key.SetValue("IdleThreshold",5,"DWORD")

Those of you who are familiar with PowerShell will see how this script works at a glance. Even if you aren’t, this script’s pretty easy to understand: It makes a small change to the client PC’s registry, relating to Lync’s registry keys.

In this case, we’re changing the “IdleThreshold” or idle timeout point.

You will have to run Set-Global-Idle.ps1 on everyone’s PCs at startup. It’ll act like a pseudo-GPO, making a background change during boot. We’ve tested it and had no errors.

Modify the script as you like! Setting idle isn’t all you can do with this method. But be careful; this causes a change to client PC registries. The wrong parameters could cause registry corruption…and nobody wants every single PC in the office to crash at once!

Bravely Standing In for Lync GPO

We’re sure Microsoft will release a Lync Server patch that lets you control global idle soon. Use our Set-Global-Idle.ps1 script as a stand-in/workaround for now. It works, but it’s an extra step imposed on your Lync setup.

Have you modified your Lync Server installation using Management Shell? How?

2 Comments

2 Ways to Configure Lync Call Forwarding

Microsoft Lync, Third-Party Lync Products, Unified Communications, Voice over IP, lync server 2010

A reader emailed me with a question about call forwarding in Lync. He wanted to keep call forwarding in place so people could receive calls while on the go. But, many of his users don’t change the forwarding while at their desks. They still take calls on their mobiles, using up minutes, when their PCs and/or VoIP phones are left unused.

So he’s looking for a way to stop call forwarding to certain numbers. At certain times.

It’s an unusual request. And after checking, we determined that such a setting isn’t currently available in Lync.

That doesn’t mean it’s not possible to configure call forwarding on a more granular level, though. In fact we came across two options for advanced call forwarding configuration. Here they are.

Tweak Call Forwarding with the “Set-CsClientPolicy” PowerShell Command

If you prefer administering in PowerShell, the Set-CsClientPolicy gives you dozens of configuration options for Lync client policies. Including call forwarding options.

For example, you could use the -HotdeskingTimeout switch to log a user out of their Lync Phone Edition after a short period of time (default is 5 minutes, but it can go down to as short as 30 seconds).

Or use -BlockConversationFromFederatedContacts to stop certain users from receiving outside calls initiated by the outside-the-office party. (Users can still call out though.)

Reserve Policy Control to the Admins with PolicyPak for Lync

We also located a third-party solution which allows you to manage Lync using Group Policy – PolicyPak for Lync. It operates like a layer on top of GPO, building in new options. Geared toward controlling which parts of the Lync client interface users can (and cannot) access.

The introductory video shows how to enable/disable a few common client settings. In terms of configuring call forwarding, PolicyPak for Lync essentially removes the control from users and puts it all in the administrator’s hands. Setting the policies you want becomes a piece of cake.

Want to test it out? A free Community Edition is available if you attend a PolicyPak webinar.

I’d recommend using Set-CsClientPolicy before trying PolicyPak. Just because there’s a lot of options available on that page, and it’s all built into Lync Server already. Still, both are useful ways of configuring many Lync client options. Including where & when calls can be forwarded.

 

P.S. – If you’re still on OCS 2007 R2 and you want to configure call forwarding, try Unify2′s Call Forwarding Configuration Utility. It lets OCS administrators configure simultaneous ring and call forwarding settings for users, from the same interface. Some of this functionality IS available in Lync Server though; if you haven’t upgraded, now’s the time to do it!

 

3 Comments

The Universal Way to Add Pictures to Lync Contacts: Use Exchange Management Shell

Exchange Server 2010, Microsoft Lync, lync server 2010

I received a reader email last week. The sender said:
“Your instructions don’t work. There is no ‘Options’ in the Mac version of Lync.”

He’s correct. Lync for Mac/Communicator 2011 doesn’t use the exact same interface as Lync 2010. So my instructions from 8 Things to Do With a New Lync Client were missing something!

Specifically, the sender wanted to add a picture to his Communicator account. So we looked for another way to add pictures.

We found one pretty fast, too! Credit to Joe on the PlanetMagpie team for the following method.

Upload Pictures with the Exchange Management Shell

The solution was to use the Exchange 2010 Management Shell. The Management Shell is a command-line interface where you can automate administrative tasks using lines of code called “cmdlets.”

I wrote about cmdlets the other day, when we discussed backing up and restoring Lync Servers.

The cmdlet we need for adding pictures is “Import-RecipientDataProperty.” The upload process Joe worked out goes like this:

  1. Upload the picture you want to add to Lync (or Communicator for Mac) to a folder on your servers. Any internal location should do, but I recommend a spot on your Lync or Exchange servers.
    • NOTE: The picture must be less than 10kb in size, and preferably 96px by 96px.
  2. Note the specific folder location. You’ll need this.
  3. On the server where Exchange is installed, click Start > All Programs.
  4. Navigate to “Microsoft Exchange Server 2010″.
  5. Click Exchange Management Shell.
  6. In the new Shell window, type the following:Import-RecipientDataProperty -Identity “User Name” -Picture -FileData ([Byte[]]$(Get-Content -Path “C:\Pictures\Picture1.jpg” -Encoding Byte -ReadCount 0))
  7. Replace the “User Name” with your username. Replace “C:\Picture\Picture1.jpg” with the specific folder location of the uploaded picture.
  8. This adds the picture to your Active Directory schema, under a property called “thumbnailPhoto.”
  9. Replicate the new property to the Global Address List (GAL). If you have Exchange 2010 SP1, this should be done by default.
  10. If not, you’ll need to turn on replication for the “thumbnailPhoto” attribute. Visit this link: Adding photos to the Exchange 2010 Global Address List – ExchangeInbox.com. Follow the instructions in the “Preparing the AD Schema” section.
  11. Lync acquires the picture from the GAL replication.

And that’s it! Your picture should now display in Lync. Even on a Mac.

Do you use Lync for Mac?  What are your impressions of its interface? Is it missing anything right now that you’d enjoy using?

2 Comments

Lync Love – March 23 2011

Conferencing, Microsoft Lync, Reference, Unified Communications, lync server 2010

Yes, I know that's a horrible pun.

Today I'm showing a little “Lync love” for other blogs venturing down the Lync Server path with me. These are ten posts from Lync blogs and reference sites. Some of them I frequent (and you should too). Some of them came up in recent searches and were too good not to share.

1. Lync Server Documentation Update and Tools Release – NextHop
I'll start out with NextHop, the Microsoft Lync Server Team's blog. If you work with Lync at all, subscribe to their blog. This post shows why; it announces updates to the Lync technical library for March, and some new tools available from Microsoft.

2. How to Configure Lync Server 2010 Archiving and View Archived IM Content – John Policelli's Blog
A surprise find–but a pleasant one. John has written a detailed post on Lync's Archiving Server. Very much worth a look for those of us who plan to deploy one.

3. Muting in Lync Server 2010 Conferences – Mike Stacy's Blog
Everyone who's run a conference has needed to mute SOMEone. Either you're running a webinar and need everyone quiet during a presentation…or somebody didn't set their audio properly before they joined a meeting. Mike Stacy is kind enough to give us 4 different scenarios for muting in Lync!

4. What is new with Group Chat in Lync Server 2010? – The Three UC Amigos
Nice overview of Group Chat, with lots of screenshots. Good stuff (as always) from the Three UC Amigos.

5. Microsoft Lync Server 2010 Edge Server Reference Architecture Diagrams – Microsoft Download Center
Three Visio diagrams showing reference architecture for Single Consolidated Edge, Scaled Consolidated Edge (DNS Load Balanced), and Scaled Consolidated Edge (Hardware Load Balanced). Excellent reference for Lync edge server deployment/configuration.

6. TS: Microsoft Lync Server 2010, Configuring – Microsoft Learning
Want to get certified in Lync? Microsoft announced an exam last week for configuring Lync Server 2010. It's required for achieving the Lync MCTS and/or Lync MCITP certifications.

7. Jeff Schertz's Blog – Lync Server MVP
Jeff blogs on Exchange, Lync, OCS and Polycom. His Lync posts primarily discuss phone administration (specifically Polycom phones). This is very specific information; it may not always apply to your Lync work. But the material is very sharp. No question it would help when your phones aren't cooperating with Lync.

8. What Roles Can I Virtualize with Lync 2010? – The Three UC Amigos
Another post from the Three UC Amigos! This one's a Q&A-style post discussing the ins and outs of virtualized Lync Servers. If you haven”t set up your Lync infrastructure yet, read this post first!

9. Curtis Johnstone,author of the Inside OCS Blog,has started a new blog called Inside Lync. (Hmmm, flattery?) He starts off the new blog with:
Microsoft Lync PowerShell Cheat Sheet.
Very thorough, function-specific set of PowerShell commands. Well worth the download for all Lync administrators.

10. There are more Lync-related blogs on this site list:
Lync Blog List – Canadian OCS Blog
(Rather disappointed we aren't on this list yet!)

I'm not sure what I'll blog about next week. Maybe Call Admission Control. Depends on whether or not something more interesting comes along…

If you have a Lync question or tool to share, please email me. Maybe it will be “more interesting”?

Either way, check back next week!

Comments Off