Archive

Posts Tagged ‘Lync Server’

New Syntax Highlighting and Auto-Complete Files for UltraEdit includes PowerShell v4, AD, Lync 2013, and Exchange 2013

March 12th, 2014 No comments

Syntax highlighting

Updated the wordfile a little bit. This one includes all previous functions as well as the following:

  1. PowerShell v4 cmdlets (the ones available when you open a new v4 session).
  2. Exchange 2013 SP1 cmdlets
  3. Lync 2013 cmdlets
  4. Active Directory cmdlets

That adds up to 2834 cmdlets/functions that get syntax highlighting on top of the 137 aliases that are also in the file. The file also has variable highlighting, as well as operators and comp operators highlighting.

Formatting changes include the following:

  1. code folding for (), so your long param() blocks can now be collapsed/expanded.
  2. code folding for region/endregion. This mimics the behavior of ISE.

If you’d like to change the colors and/or fonts used for highlighting, go to View>Themes>Manage Themes, or Layout>Themes>Manage Themes (depending on your version of UltraEdit) as the styling in the wordfile is ignored starting with v20 of UltraEdit.

manage themes

As with all other wordfiles, they are stored in “%appdata%\IDMComp\UltraEdit\Wordfiles\”, unless you change the path in Advanced>Configuration>Editor Display>Syntax Highlighting or Advanced>Settings>Editor Display>Syntax Highlighting (again, depending on your installed version of UltraEdit).

wordfile path

You can optionally set the “Highlight new file as:” to PowerShell, as I do (also shown above).

As soon as you place this wordfile in that folder, you should see PowerShell as an option under View>View as (Highlighting File Type)

view as highlighting

Auto-complete

I’ve also created an auto complete file that contains the same cmdlet/function names as the syntax highlighting file. When enabled, you get tab completion of cmdlet and function names similar to the PowerShell console and ISE. Note, however, that in UltraEdit, you only get auto-complete of the cmdlet/function names, not their parameters.

You can save the file anywhere. Then, go to Advanced>Configuration>Editor>Word Wrap/Tab Settings (or Advanced>Settings>Editor>Word Wrap/Tab Settings) to specify the location within UltraEdit:

auto-complete path

Then go to Auto-complete and check the box “Show auto-complete dialog automatically” and also enter a number in the box. 5 works for me.

auto-complete options

Now, when typing a cmdlet/function that’s in the auto-complete file, you’ll get suggestions.

auto-complete suggestions

Up/down errors navigate through the list, and tab uses the highlighted suggestion.

Download

UltraEditSyntaxHighlighingAuto-CompleteFiles.zip

Function: New-TrustedIESite – Add URLs to IE’s Security Zones

February 8th, 2014 3 comments

Description

This function probably doesn’t have a lot of users to most people. But in Lync, adding the Simple URL for the Lync Server Control Panel to the Local Intranet zone resolves the issue of having to enter credentials each time. Of course, I like to automate the configuration of things, so I whipped up this little function, and it will be included in some of my build scripts. The script basically creates the required registry entries under HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains. Immediately after running the function, we can see the new entry in Internet Explorer

Internet Explorer Trusted Intranet Zone

Internet Explorer Trusted Intranet Zone

Syntax

New-TrustedIESite [[-url] ] [[-zone] ] []

Zones are as follows:

1 Local Intranet
2 Trusted Sites
3 Internet
4 Restricted Sites

example:

New-TrustedIESite -url https://lyncadmin.contoso.com -zone 1

Will add https://www.lyncadmin.contoso.com to the Local Intranet zone

Download

v1.0 – 02-08-2014 – New-TrustedIESite.v1.0.zip

Lync and Skype for Business Contacts – Where Does the Company Name Come From?

August 16th, 2013 2 comments

I was curious the other day about where the company name comes from in the Lync/Skype for Business Contacts. For instance, we see Elan and Jeff below:

elan - jeff

The quick answer is it can pull that info from an Outlook contact in your mailbox. But what if you don’t have the user in your Outlook contacts?

I knew that it was in Active Directory somewhere, and thought it would be an organization setting somewhere since my experience has shown that the company name is always exactly the same for all users in each company I see in my contacts – right down to punctuation. Some cmdlets let you specify an org name, like Set-CsConferencingConfiguration, but that wasn’t it.

With the help of fellow Skype for Business MVP Brian Ricks, we got it narrowed down to the Company field on a user’s account in Active Directory. For example, we look at Sara’s account in Active Directory Users and Computers, and see her company set:

sara - aduc
And when a federated Lync/Skype for Business user looks at her in the Lync/Skype for Business client, we see her company defined:

sara - contact card

But some people show as “External Network” as we see for fellow UC Architects member John Cook:

John - external

And there are two reasons why this can happen. The first is that the user is homed on a cloud hosted solution like Office 365. Not the case here for John. Like me, he’s got a full Lync install going on at home. The other reason this could happen is that the user’s company field is completely blank. Sure enough, John’s is blank. So he updates that field, and a short time later, his company name shows up to federated contacts.
john - correct

This is really a minor thing, but I’ve noticed the company field is hit or miss in orgs where onboarding of users is done manually. But no worries, updating the users is fairly straight-forward in ADUC. You can highlight multiple users in one OU, right click to edit, go to the Organization tab, and enter a valid company name. In more complex orgs, you could use a query to list all of the users without a company name. This can be accomplished by right clicking on the Saved Query branch on the left, and selecting New>Query. Click Define Query, set Find to Custom Search, and add to conditions: Field to Company and Condition to Not Present. And second, Field to Office Communications Server Address, and Condition to Present.

aduc

Once you click OK, you’ll be presented with a list of the users who don’t have a company, but are Lync/Skype for Business enabled. Just like mentioned above, you can select multiple/all of the users, right click, go to Properties>Organization, and enter a company name.

bulk edit

Once updated and replicated, federated users should see the changes within a short time. We can also query and update user accounts via PowerShell on any machine with the ActiveDirectory module installed. We can query for users where the company name is not set using:

Get-AdUser -Filter {Company -notlike '*'} -Properties * -ResultSetSize $null | Select-Object -Property Name,Company

And we can update them all at once using:

Get-AdUser -Filter {Company -notlike '*'} -Properties * -ResultSetSize $null | Set-AdUser -Company 'Contoso'

Having it on the individual user’s account does make more sense as this allows for multiple names within the same org. But it does require ensuring that the company field is set for each user.

As for the title, the same applies – it’s set on the individual user account. However, unlike company name, title can also be set on Office 365 accounts.