Archive

Archive for the ‘Lync Server/Skype for Business Server’ Category

One Liner: Getting Your Public IP Address With PowerShell

January 12th, 2018 1 comment

My friend Matt (@MatthewDippel) was espousing the clean results that https://wtfismyip.com provides over more popular sites like http://www.whatismyip.com. Matt noted that other than the explicit language on wtfismyip.com, the results were cleaners and easier to use that others. Matt’s a developer, so I had to give him some grief that he used a web page instead of writing some code. I figured I should share that code here, because in ten minutes, I’ll forget what it was, and need to look it up some time in the future.  🙂

The information is fairly straight forward to retrieve, assuming you can find a source that provides it. dnsomatic.com is one such site. If you see the documentation for developers at http://www.dnsomatic.com/wiki/api, you can see that they provide an example of browsing to http://myip.dnsomatic.com returns the public IP of the client requesting the page. That being the case, we can use something simple like invoking a web request in PowerShell to get that data. Easy peasy. We can just look at the content value of the returned results:

(Invoke-WebRequest 'http://myip.dnsomatic.com').Content

And we see that it returns just a simple text value of our public IP address:

VERBOSE: GET http://myip.dnsomatic.com/ with 0-byte payload
VERBOSE: received 13-byte response of content type text/html
173.10.47.133

Now, we can expand on that a bit, albeit getting away from the one-liner concept. We can take the results of the above query and send them to the GEO IP service at webservicex.net and get some geo info:

$ip = (Invoke-WebRequest "http://myip.dnsomatic.com").Content
$geoip = New-WebServiceProxy "http://www.webservicex.net/geoipservice.asmx?WSDL"
$geoip.GetGeoIP($ip)

For more info on WebserviceX’s geo lookup, check out http://www.webservicex.net/New/Home/ServiceDetail/64.They’ve got some other cool solutions, including retrieving weather data, at http://www.webservicex.net/new/Home/Index.

And what we see here is

VERBOSE: GET http://myip.dnsomatic.com/ with 0-byte payload
VERBOSE: received 13-byte response of content type text/html
ReturnCode        : 1
IP                : 173.10.47.133
ReturnCodeDetails : Success
CountryName       : United States
CountryCode       : USA

We see where we get the country name and code as well.

BTW – I found another source of IP info that also doesn’t require cleanup. And that is Matt’s new favorite, wtfismyip.com.

(Invoke-WebRequest 'https://wtfismyip.com/text').Content

I’m happy to add others to this list if you send me the info.

You’ll notice the verbose output in the above examples. If you want to suppress the verbose output, we can do that with the -Verbose parameter, setting it to $false:

(Invoke-WebRequest 'https://wtfismyip.com/text' -Verbose:$false).Content

As you can see, getting your public IP address is fairly straightforward.

The Case of the Missing Skype for Business Presence Options in the Taskbar

January 8th, 2018 1 comment

On Twitter, Noah Sparks (@noahsparks) asked about why some users running Windows 10 can change their Skype for Business presence from buttons that appear when hovering over the Skype for Business taskbar, and others couldn’t. See these two examples taken from my Windows 10 Insider Preview machine.

Hovering over Skype for Business taskbar – no presence controls

Hovering over Skype for Business taskbar – with presence controls

Several people started to hypothesize about the difference, and looking at bitness (32 or 64bit), client source (Click to Run or MSI), and version numbers. Turns out it’s based on the value of a interestingly named registry key called AutoOpenMainWindowWhenStartup. Alexander Holmeset (@alexholmeset) posted the right key and value. I tested it and came up with the following PowerShell code to turn it on. The code basically makes sure you’re running the v16 version of Skype for Business, and then creates the key if it doesn’t exist, and sets the value. If the key does exist, it just sets it. Fire up PowerShell and paste the following. There should be no output.

if (Get-Item -Path 'HKCU:\Software\Microsoft\Office\16.0'){
  if (-Not(Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Office\16.0\Lync' -Name 'AutoOpenMainWindowWhenStartup')){
    $null = New-ItemProperty -Path 'HKCU:\Software\Microsoft\Office\16.0\Lync' -Name 'AutoOpenMainWindowWhenStartup' -Value 1 -PropertyType DWORD
  }else{
    Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Office\16.0\Lync' -Name 'AutoOpenMainWindowWhenStartup' -Value 1
  }
}

This code has only been tested on my machine, which is running the C2R version of the Skype for Business 2016 client. I noticed it only works when the taskbar icon is there, and doesn’t seem to work over the systray icon – but then again, there are already presence options when you click on the systray icon anyways. I haven’t tested with any other version of the Skype for Business client, nor on any other operating system. If you do test it with other platforms, please report your findings and I’ll update this post. To set it back (disable the presence options when hovering), just set the registry value to zero, such as shown below.

Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Office\16.0\Lync' -Name 'AutoOpenMainWindowWhenStartup' -Value 0

Another mystery solved!

UC Inside Track: Episode 3: Huge Teams Features Release with special guest Matt Landis

January 5th, 2018 No comments

In this first episode of the new year, special guest Matt Landis and I discuss the whopper release of new features for Microsoft Teams, and how they relate to Skype for Business. They include:

New Calling Roadmap Features

  1. Simultaneous Ringing
  2. Speed dial
  3. Suggested Contacts
  4. Voicemail
  5. Translate user input to standard format phone number
  6. Call Quality Diagnostic Portal
  7. TTY Support
  8. Skype for Business-Teams Calling
  9. Blind Transfer
  10. Call Blocking
  11. Call Forwarding
  12. Caller ID masking
  13. e911 Support
  14. Extension Dialing
  15. Hold
  16. Multi-call Handling
  17. Enable Existing Calling Plan Support

New Meetings Roadmap Features

  1. Edge, Chrome Browser Support for meetings
  2. Interactive Troubleshooting
  3. Audio Conferencing in over 90 countries
  4. Mute Other Participants
  5. Application Sharing

New Messaging Roadmap Features

  1. Contact Groups
  2. Unified Presence

New IT Pro Roadmap Features

  1. Messaging Policies
  2. Teams Interop Policies
  3. Client Support

Delayed Features

  1. Enable Call Quality Analytics
  2. Lobby Support
  3. Anonymous Join
  4. Give and Take control in sharing

Episode 3: http://www.voss-solutions.com/media/podcast/podcast_003.mp3

UC Inside Track is available directly via the link above, via RSS, iTunes, TuneIn, Google Music Play, and Podcast Addict.

UC Inside Track: Episode 2: Skype for Business vs Teams, and Assessing Your Network with special guess Tom Arbuthnot

December 13th, 2017 No comments

In this episode, my special guest Tom Arbuthnot and I look at Skype for Business updates, new tools from Microsoft, and Teams, and more. This includes:

– What to expect in Teams vs what’s already in Skype for Business
– Updated Network Assessment Tools
– .NET 4.7 support for Skype for Business
– CCE 2.1
– Skype for Business and Teams feature comparisons table and Teams roadmap
– Automating your workflows using Connectors in Microsoft Teams

Episode 2: http://www.voss-solutions.com/media/podcast/podcast_002.mp3

UC Inside Track is available directly via the link above, via RSS, iTunes, and now, TuneIn.

New Podcast: UC Inside Track Takes a Look at Microsoft UC Stack – First episode with special guest Jonathan McKinney

November 22nd, 2017 1 comment

Earlier this year, the podcast I had been involved in since its inception, The UC Architects, ended its five-year run. It was a lot of fun, but the format was difficult to maintain. So, I’ve started a new podcast dealing with the Microsoft Unified Communications (UC) stack, with just a single guest on each episode. Guests will be tech luminaries such as fellow MVPs, MCMs/MCSMs, and/or Microsoft staff. The podcast is designed to deliver regular insight into the Microsoft UC market as an easy-to-consume audio file. Each episode will be in a shorter format than the UCA was, making it easier to listen to while driving to work or doing other tasks. We’ll tackle fewer topics, but each in further depth.

Listeners can listen to the podcasts in any of the following ways:
– Subscribe to the UC Inside Track podcast series on iTunes or via your favorite RSS client.
– Listen on TuneIn.
– Listen to the podcast directly via the link below.

In the first podcast, I’m joined by Jonathan McKinney (@ucomsgeek), MVP and MCM, to discuss the recently released Skype for Business to Teams capabilities roadmap. Both Jonathan and I are on the Microsoft Elite Teams for both Skype for Business and Microsoft Teams, and have collaborated for many years. The exchange is lively and informative. The recording was made available to download from iTunes on Friday, November 17.

Episode 1: http://www.voss-solutions.com/media/podcast/podcast_001.mp3

Look for more episodes at least monthly. In episode 2, I’ll be joined by fellow MVP and MCM Tom Arbuthnot (@tomarbuthnot).

Review: BounSky – Configure Multiple Accounts to Easily Switch Between With Your Skype for Business Client!

October 23rd, 2017 No comments

Description

Anyone working in Skype for Business consulting or support knows what a pain it is to test various accounts in an environment. Whether it’s testing an account in a new environment you’ve deployed, or troubleshooting an issue for a user, the process isn’t as easy as it could be. The Lync and Skype for Business clients only allow you to configure a single account. Well, once again, the community comes to the rescue!

Office Servers and Services (Skype for Business) MVP Greig Sheridan (@GreigInSydney) has come up with a solution with his clever BounSky application. The successor to ‘Profiles for Lync’, BounSky allows you to configure up to, wait for it, EIGHTY different Lync and Skype for Business accounts, and switch between them at the click of the mouse or hotkey combo. Each account can be configured with the typical sign-in address, user name, password, and alias. But each can also be manually configured to use specified internal and external server names, which is key in testing out scenarios where DNS is either not yet configured, or you’re attempting to bypass current configuration. Passwords are stored encrypted in the configuration file. The configuration can be exported and imported, which makes moving between machines or reloading workstations less troublesome.

BounSky menu

Once configured a simple click on the taskbar/system tray icon brings up the menu and allows you to quickly click on a button next to each listed account. Presto, the client signs out of the current account and signs into the chosen account.

A nice feature is the new Auto-Home feature, which will automatically log you back into a default account after a configured number of hours and minutes. This is great in case you forget that you’re logged into a test account. A little stopwatch icon shows in the lower left corner to show the timer, and allows you to disable/suspend the Auto-Home feature. Click the image below for a view of the various options available.

BounSky options screen

BounSky also has the ability to be utilized to change sites by a command line interface.

Greig has informative user guide about the product on the BounSky website that breaks down every feature in detail. There’s also great troubleshooting and FAQ sections, although I don’t think I’ve ever had to use them. The tool just plainly works.

Installation

Download the MSI installer and run through it. Once launched, you can set the accounts and various application settings. Click the image below to see what the account setup screen looks like.

BounSky Account Setup screen

Conclusion

This is a phenomenal solution for those who must log-in to various Lync/SfB accounts. I use it often on deployments to test accounts in new pools, or those in Office 365 for hybrid scenarios. I also have work and personal tenants that I switch between. I can’t recommend this solution enough. Greig’s done an awesome job at filling a gap in the Skype for Business client space.

Review: UC Extend – Set Your Skype for Business Presence Based On Time of Day!

May 1st, 2017 No comments

Description

A common request from Lync and Skype for Business users over the years is to be able to set Lync/Skype for Business presence based on rules. And a common rule is time. So, set my presence to ‘away’ at 5pm every weekday. Well, as is usually the case, the community was listening, and Andrew Morpeth (@AndrewMorpeth), fellow Skype for Business MVP, released a free solution called UC Extend.

UC Extend allows you to set various time of day presence and personal note changes. For example, you can set a presence of ‘Off work’ to start at 5:30pm until 8:00am. And the personal note can be something like ‘It’s currently outside my normal work hours so I may not respond’. UC Extend forces the configured presence and personal note during this time. So, even if you’re working on your computer, which would normally cause a presence of ‘available’, UC Extend will keep it as ‘Off work’. There are 4 standard ‘rules’ that can be enabled and configured, and they apply to every day. There is also a weekend rule that matches based on the day. So, if your weekend is Saturday and Sunday, from Midnight Friday till midnight Sunday, the configured rule will apply, and takes priority over the other rules. See the screenshot below to see how the application lays out the rules and their settings.

UC Extend has several other options as well, including forcing one UI (Skype for Business/Lync), and automatic ‘away’ settings. Andrew has done some work around also adding configuration of unanswered calls, but those features are not yet available. The right-click context menu for the application also supports custom options and custom URLs that are configured in the applications XML file. I did play around with those, but haven’t really found a need for them yet. Other options include the ability to include custom option in the Lync/Skype for Business context menu, which could be nicer. This includes custom support URLs, as well as the ability to launch an application. UC Extend also supports configuring registry keys in the XML, and forcing a value for those keys, such as when a change is detected. Andrew’s site describes these features further, and the XML file has some decent comment notes.

UC Extend will trigger a toast notification and system sound whenever it makes presence changes. For me, that’s a good ‘reminder’ that the working day is over.

Installation

Download the application from the TechNet Gallery. Run through the MSI installer, and you’re up and running. You can right-click on the ‘UC’ system tray icon to adjust the settings.

Conclusion

The application was released a while ago, and some of the dialogs mentions Lync instead of Skype for Business. The bottom of the settings dialog is an example of this. It doesn’t detect the sign-in status of Skype for Business in that location. But the application works great for Skype for Business clients. I really like the solution, and continue to use it to this day. My only real request, other than updating some of the dialogs to support Skype for Business, is to store the original personal note, so that when it’s outside of any of the configured rules, it can restore that. Or, and option to pick the original personal note instead of forcing a configured personal note. Certainly not a show stopper for me – just a wish. Maybe Andrew will get around to finishing the ‘unanswered calls’ config. Still, a cool solution that fills a known gap.

Review: Skyue – Set Your Phillips Hue Lights to Match Your Skype for Business Presence!

April 1st, 2017 No comments

Description

A year or so ago, when I began some renovation projects, I started to really get into home automation. I’ve now got two Nest thermostats, probably a dozen Nest Protect devices, some Next cameras, dozens of Phillips Hue lights, and a bunch of SmartThings sensors, smart plugs, and more. I’m also utilizing things like 7 Amazon Alexa devices, Siri, and IFTTT and Stringify to help tie things together. They really all work great, with the exception of the Ring video doorbell, which, IMHO, is a piece of garbage –

For quite some time I’ve played with some of the presence lights by vendors such as Embrava’s Blynclight and Kuando’s Busylight family. They work really well at letting others see your presence before they interrupt you. I’ve used them both at customer locations (‘cube farms’) and in my home office. The problem in the home office is that I wanted the light to be outside of my office door, so that family members could see my presence if my door was closed. That required a long USB extension cable, and wasn’t the cleanest looking solution. Then one day, I was playing with some Hue bulbs and Alexa, when it dawned on me that it would be cool to change one or more Hue bulbs to match my presence. So I reached out to Tom Morgan (@TomMorgan), Skype for Business MVP, ace developer, and former coworker, with my idea. Not long after that, he introduced Skyue. Skyue is a client side system tray application that controls Hue lights, and sets them to your presence. Brilliant!

I set this up to utilize a light on the main floor, near the stairs. My office is on the second floor, so the light is visible before people come up the stairs. While my family doesn’t know what all the various presence colors mean, they do know that red (busy/on a call/in a conference) and purple (DND) mean that you approach my office with caution. My grandson also knows that it means not to run around the house like a banshee, because Papa is probably on a call (hey – I’m no presence liar!). The app keeps the bulbs in sync, and there is really no delay between a change in presence and the bulb color being updated.

Installation

Pretty easy, really. Download the tool and run it. It will prompt you to press the button on your Hue hub. Once that’s done, click the button in the app acknowledging that you pressed it. Select the Hue light(s) that you’d like to control. Only the color ambience lights should be visible in the pick list. White ambience lights are not – for good reason. You can also set the level of brightness for the lights. This was something that I asked for because a Hue light is pretty bright. So, setting to 20% was a perfect level to be seen but not overbearing. Once you hit ‘Save’, you’re off and running. You can also adjust the settings by right clicking on the little floor lamp icon in the system tray.

Coming soon

According to the website, Tom is looking at adding Contacts so you can show their presence, as well as notifications for incoming IMs, and incoming calls.

Conclusion

I’ve been running this for many months now, and it’s been rock solid. If you’re looking to have a quality solution to leverage existing Hue lights and Skype for Business, Tom’s cool utility should fill the requirement. Highly recommended!

All Skype for Business 2015 Cmdlets and the Default RBAC Roles That Can Use Them

December 23rd, 2016 No comments

Description

In All Lync 2013 Cmdlets and the Default RBAC Roles That Can Use Them and the corresponding 2010 version, I show a table that lists every cmdlet available in a fully patched Lync server environment, and the default permissions for each of the default RBAC roles. Doing one for Skype for Business was always on my list, but I never really got around to it until a visitor recently noted that some of the RBAC permissions changed for existing cmdlets when compared to the Lync Server 2013 list. So I figured it was time to do a new one. The previous versions were all manually created – every row. That was extremely laborious, taking many hours. This time around I automated the info gathering using (what else), PowerShell. This gave me all of the data in a .csv file, and three minutes of styling in Excel, and presto!

One thing I did notice is that there is a small group of cmdlets that don’t yet have a description, synopsis, uri, etc. So you’ll see those blank cells highlighted in bright red for now. I’ve reached out to the Product Group for info on when that info will be available. As soon as I have an answer, I’ll get it posted here.

So the spreadsheet is available below, but what good would a blog article be without some PowerShell code? So here’s the code I came up with to create the spreadsheet.

$objectCollection = @()
foreach ($cmdlet in (Get-Command -Module SkypeForBusiness | Sort-Object Name)){
    Write-Output $cmdlet
    $cmdletHelp = $(Get-Help $cmdlet)
    [string] $Synopsis = $cmdletHelp.Synopsis
    [string] $URI = (($cmdletHelp.relatedLinks.navigationLink | Where-Object {$_.linkText -match "Online Version"}).uri) -replace "EN-US/",""
    [string] $RBAC = "Get-CsAdminRole | Where-Object {`$`_.Cmdlets `–imatch `"$cmdlet`"}"
    $rbacroles = Get-CsAdminRole | Where-Object {$_.Cmdlets –imatch "$cmdlet"}

    [bool] $RbacCSAdministrator = $rbacroles.identity -icontains "CSAdministrator"
    [bool] $RbacCSVoiceAdministrator = $rbacroles.identity -icontains "CSVoiceAdministrator"
    [bool] $RbacCSUserAdministrator = $rbacroles.identity -icontains "CSUserAdministrator"
    [bool] $RbacCSResponseGroupAdministrator = $rbacroles.identity -icontains "CSResponseGroupAdministrator"
    [bool] $RbacCSLocationAdministrator = $rbacroles.identity -icontains "CSLocationAdministrator"
    [bool] $RbacCSArchivingAdministrator = $rbacroles.identity -icontains "CSArchivingAdministrator"
    [bool] $RbacCSViewOnlyAdministrator = $rbacroles.identity -icontains "CSViewOnlyAdministrator"
    [bool] $RbacCSServerAdministrator = $rbacroles.identity -icontains "CSServerAdministrator"
    [bool] $RbacCSHelpDesk = $rbacroles.identity -icontains "CSHelpDesk"
    [bool] $RbacCSResponseGroupManager = $rbacroles.identity -icontains "CSResponseGroupManager"
    [bool] $RbacCSPersistentChatAdministrator = $rbacroles.identity -icontains "CSPersistentChatAdministrator"

    $object = New-Object –Type PSObject
    $object | Add-Member –Type NoteProperty –Name Cmdlet -Value $cmdlet
    $object | Add-Member –Type NoteProperty –Name Description -Value $Synopsis
    $object | Add-Member –Type NoteProperty –Name Uri -Value $URI
    $object | Add-Member –Type NoteProperty –Name Validate -Value $rbac
    $object | Add-Member –Type NoteProperty –Name CSAdministrator -Value $RbacCSAdministrator
    $object | Add-Member –Type NoteProperty –Name CSArchivingAdministrator -Value $RbacCSArchivingAdministrator
    $object | Add-Member –Type NoteProperty –Name CSHelpDesk -Value $RbacCSHelpDesk
    $object | Add-Member –Type NoteProperty –Name CSLocationAdministrator -Value $RbacCSLocationAdministrator
    $object | Add-Member –Type NoteProperty –Name CSPersistentChatAdministrator -Value $RbacCSPersistentChatAdministrator
    $object | Add-Member –Type NoteProperty –Name CSResponseGroupAdministrator -Value $RbacCSResponseGroupAdministrator
    $object | Add-Member –Type NoteProperty –Name CSResponseGroupManager -Value $RbacCSResponseGroupManager
    $object | Add-Member –Type NoteProperty –Name CSServerAdministrator -Value $RbacCSServerAdministrator
    $object | Add-Member –Type NoteProperty –Name CSUserAdministrator -Value $RbacCSUserAdministrator
    $object | Add-Member –Type NoteProperty –Name CSViewOnlyAdministrator -Value $RbacCSViewOnlyAdministrator
    $object | Add-Member –Type NoteProperty –Name CSVoiceAdministrator -Value $RbacCSVoiceAdministrator
    $objectCollection += $object
}
$objectCollection | Export-Csv -Path $env:UserProfile\desktop\SfB2015cmdlets.csv -NoTypeInformation -Encoding UTF8

Donations

I’ve never been one to really solicit donations for my work. My offerings are created because *I* need to solve a problem, and once I do, it makes sense to offer the results of my work to the public. I mean, let’s face it: I can’t be the only one with that particular issue, right? Quite often, to my surprise, I’m asked why I don’t have a “donate” button so people can donate a few bucks. I’ve never really put much thought into it. But those inquiries are coming more often now, so I’m yielding to them. If you’d like to donate, you can send a few bucks via PayPal at https://www.paypal.me/PatRichard. Money collected from that will go to the costs of my website (hosting and domain names), as well as to my home lab.

Download

v1.0 – 12-23-2016 – SkypeForBusiness2015cmdlets.xlsx

Script: Set-CsFeatures.ps1 – Easily Install Prerequisites and Tools for Lync Server 2013 and Skype for Business Server 2015

October 24th, 2016 26 comments

skype_for_business_secondary_blue_rgbDescription

Installing Skype for Business and Lync servers is usually boring if you’re a consultant who does it often. Making sure the server specs are right, installing OS features, configuring NICs, etc. It’s even more boring if you’re building a bunch of servers at one time. There’s always a chance for human error, too. So why not automate as much as possible? That’s what I was after when I built the Lync Server 2010 prereq script, then the Lync Server 2013 prereq script. And it’s certainly what I’m after for Skype for Business Server 2015. This time, however, I opted to not have a separate script for Skype for Business. Many of the requirements are the same, or just slightly different, than Lync Server 2013. So I just added the Skype for Business functionality to the 2013 script, and updated everything as a whole.

When calling the script, one only needs to specify the –Skype4b switch to put the script into “Skype for Business mode”. Not specifying that switch cause a pop-up to appear, asking what mode you’d like. The menus don’t change based on what mode the script is in. Options for only one platform are clearly noted. Otherwise, the options automatically adjust for the platform you’ve chosen. The menu starts out with core prerequisite options for common Lync/SfB roles, followed by Microsoft tools and resources, some third-party tools and options, and then some sub-menus. Sub-menus are broken down by Misc server config, Desktop shortcuts, Taskbar shortcuts, Downloads, and Security options. As you can see, there are TONS of options. I’m not going to list every menu and option here, as the nature of the script means I’ll be adding/updating things as people request them, or as vendors update/alter their offerings. Just note that the options from the 2013 script have been moved around a little bit as I try to keep things organized.

This version also uses my new method of checking for updates, as mentioned in Function: Get-UpdateInfo – Making It Easy for Your Users to Get the Latest Version of Your Scripts. When a new version is available, you’ll get a pop-up notifying you.

If you’re aware of a third-party product, or even Microsoft product, that is a good match for Skype for Business servers, let me know. I’m happy to take a look and see if it would make a good addition to the script.

Super big thanks to my beta testers for supplying bug reports, suggestions, and comments.

Syntax

C:\Set-CsFeatures.ps1 [-TargetFolder <String>] [-WindowsSource <String>] [-SQLPath <String>] [-InitialMenuOption <Int32>] [-IncludeSSMS ] [-IncludeTelnet ] [-IncludeFW ] [-IncludeHighPower ] [-IncludeStandard ] [-GetInfoFromRegistry ] [-OWASOveride ] [-DownloadOnly ] [-SkipCoreCheck ] [-Tail ] [-Skype4b ] [-SkipUpdateCheck ] [-DisableAutoUpdates ] [-IncludeLanguagePack ] [-SkipEdgeNicConfig ] [-WhatIf ] [-Confirm ] [-IncludeTotalCount ] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

C:\Set-CsFeatures.ps1 [-TargetFolder <String>] [-GetInfoFromRegistry ] [-OWASOveride ] [-DownloadAll ] [-SkipCoreCheck ] [-Tail ] [-Skype4b ] [-WhatIf ] [-Confirm ] [-IncludeTotalCount ] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

C:\Set-CsFeatures.ps1 [-GetInfoFromRegistry ] [-ClearRunningStatus ] [-WhatIf ] [-Confirm ] [-IncludeTotalCount ] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

C:\Set-CsFeatures.ps1 [-GetInfoFromRegistry ] [-Skype4b ] [-WhatIf ] [-Confirm ] [-IncludeTotalCount ] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Examples

.\Set-CsFeatures.ps1 -Skype4b

Runs script in Skype for Business mode. Options chosen while running in this mode are tailored to Skype for Business. Not specifying this option will cause a pop-up prompt when the script starts, allowing a user to choose the desired mode.

.\Set-CsFeatures.ps1

Runs script with default values.

.\Set-CsFeatures.ps1 -WindowsSource "d:"

Runs script with the location defined for the Windows Server 2012/2012 R2 installation files.

.\Set-CsFeatures.ps1 -SQLPath "d:\sqlexpress"

Runs the script and installs any required SQL Express instances in the specified location.

.\Set-CsFeatures.ps1 -TargetFolder "d:\installbits"

Runs the script, and saves any downloaded files and written logs in the specified location instead of the default “c:\_install”.

.\Set-CsFeatures.ps1 -InitialMenuOption 3

Runs the script, and automatically starts option 3 (Front End server). Once it’s finished with that option, the script functions as normal, and displays the menu. NOTE: only options from the main menu can be specified. Options in sub-menus are not available with -InitialMenuOption.

.\Set-CsFeatures.ps1 -tail

Runs script with default values, but also shows an additional PowerShell window showing a live running log file.

Parameters

-TargetFolder

Defines the location for any downloaded files. Defaults to “c:\_install”. Additionally, log files generated by this script are located in a sub-folder of TargetFolder called “logs”. TargetFolder does not support paths with spaces, but does support non-hidden UNC paths.

-WindowsSource

Defines the location of the Windows Server installation files. This is needed to install .Net 3.5 since those files are not installed on the server by default. Defaults to first detected CD-ROM/DVD drive. This can be a local file path, path to an .ISO file, or a non-hidden UNC path.

-SQLPath

Defines the desired installation path for SQL Express. Defaults to “c:\Program Files\Microsoft SQL Server”.

-InitialMenuOption

Allows you to start the script with the option you want, without first displaying the menu.

-IncludeSSMS

If specified, will include SQL Server Management Studio automatically when prerequisites are installed for any server that has SQL Express instances. If not specified, a prompt will appear.

-IncludeTelnet

If specified, will include Telnet automatically when prerequisites for Front End servers, Director servers, Mediation servers, Edge servers, and/or Persistent Chat servers are installed. If not specified, a prompt will appear.

-IncludeFW

If specified, will include the firewall rules for Get-CsConnections automatically when prerequisites for Front End servers are installed. If not specified, a prompt will appear.

-IncludeHighPower

If specified, tells the script to automatically set the Power Config on the server to High Power. This is instead of the script prompting. This option is available for all server roles.

-IncludeStandard

If specified, tells the script to include the extra SQL Express instance required for Standard Edition front end servers. This is instead of the script prompting.

-GetInfoFromRegistry

This value is only used during mid-prereq reboots. It is automatically set and read by the script, and should never be manually specified.

-OWASOveride

Don’t use this parameter. It’s for internal testing only. Using it can render the server unusable.

-DownloadOnly

Tells this script to not install or configure anything – just download the files. This is useful if you’re going to be building servers that do not have Internet access and want to fetch the files beforehand. The big difference between this option and -DownloadAll, is that this option presents the normal menus, and allows you to download files for the options you pick. The -DownloadAll option downloads ALL files needed for ALL options.

-DownloadAll

Tells this script to not install or configure anything – just download ALL of the files. This is useful if you’re going to be building servers that do not have Internet access and want to fetch the files beforehand from a desktop computer. The big difference between this option and -DownloadOnly, is that this option downloads ALL files needed for ALL options, whereas -DownloadOnly allows a user to download files for specific options they choose.

-ClearRunningStatus

This switch forces the running status to be reset. This option should ONLY be used if the script exits/aborts dirty, and attempts to run the script again yield a “Script is already running” message.

-SkipCoreCheck

When specified, skips the check for Server Core. It is not meant to be called manually, as it’s used when the script needs to restart after a server reboot.

-Tail

When specified, opens another PowerShell session and tails the log file, similar to *nix. This is really only beneficial during troubleshooting.

-Skype4b

When specified, uses values specific to Skype For Business Server 2015 for prerequisites. If this option is NOT specified a pop-up will appear, asking which mode the script should operate in: Lync Server 2013 or Skype for Business Server 2015.

-SkipUpdateCheck

When specified, skips the check for a newer version of the script. This option is included mainly for when the script reboots the server.

-DisableAutoUpdates

When specified, skips the prompt and automatically disables auto updates for Windows Server. If not specified, a prompt is displayed.

-IncludeLanguagePack

When specified, skips the prompt for the installation of the Office Online Server English language pack. If not specified, a prompt is displayed.

-SkipEdgeNicConfig

When specified, skips the configuration of the NICs on edge servers. This requires that you manually complete those steps.

-SkipAutoStart

When specified, will not automatically restart the script after a required reboot. The ONLY time this should be used is if you need to do something before the script starts again, like manually mounting an ISO file that the script needs.

Installation

No installation is necessary.

Execution Policy: Third-party PowerShell scripts may require that the PowerShell Execution Policy be set to either AllSigned, RemoteSigned, or Unrestricted. The default is Restricted, which prevents scripts – even code signed scripts – from running. For more information about setting your Execution Policy, see Using the Set-ExecutionPolicy Cmdlet.

Donations

I’ve never been one to really solicit donations for my work. My offerings are created because *I* need to solve a problem, and once I do, it makes sense to offer the results of my work to the public. I mean, let’s face it: I can’t be the only one with that particular issue, right? Quite often, to my surprise, I’m asked why I don’t have a “donate” button so people can donate a few bucks. I’ve never really put much thought into it. But those inquiries are coming more often now, so I’m yielding to them. If you’d like to donate, you can send a few bucks via PayPal at https://www.paypal.me/PatRichard. Money collected from that will go to the costs of my website (hosting and domain names), as well as to my home lab.

Known Issues

The only issue I’m aware of at the release of the latest version is that pinning shortcuts to the taskbar in Windows Server 2016 doesn’t seem to be working. If you come across something, please let me know. Contact info is in the header of the script, and the script also has option 96, ‘how to report a bug’ that will tell you what information is critical when reporting a problem.

Frequently Asked Questions

Question: Does this script support Windows Server 2016?

Answer: Yes – starting with version 4.20, prerequisites for Windows Server 2016 are included.


Question: Why doesn’t this script support Windows Server 2008 R2 and earlier?

Answer: I get asked this all the time. There are several reasons. The first is that out of the box, Server 2008 R2 has PowerShell 2.0 installed, and this script is written in PowerShell 3.0. Requiring you to upgrade to PowerShell 3.0 first, before running a script that installs prerequisites, seems counter-intuitive. And converting the script to just use PowerShell 2.0 is taking a step backwards, especially considering that the current version of PowerShell is 5.0, and even as this is written, 5.1 is in preview.

Next is sheer time. I test changes I make. And then I test them again. And then I choose different options and combinations and test them. Testing on just Server 2012 and Server 2012 R2 is exhausting. Adding Server 2008 R2 would mean even more testing, plus I’d have to add those resources in my already overtaxed test labs. That would slow down my ability to add new features and test fixes.

Third is that Server 2008 R2 is three versions back. Get with the times already!


Question: Does the script support Windows Server 2016?

Answer: No, and the primary reason is that Lync Server 2013 and Skype for Business Server 2015 are not supported on Windows Server 2016. Once they are supported on Windows Server 2016 (and it will likely only be Skype for Business Server 2015 that’s supported), I’ll adjust the script as needed. I’ve already done some preliminary work.


Question: Can you add feature x?

Answer: I LOVE getting feature requests. Seriously! Best method to suggest features is to send me an email. My email address is in the comment section at the top of every script I publish. Please be detailed in what you’d like to see, as well as any scenarios you’d use the option (so I can try to duplicate testing). This also goes for additional tools, whether Microsoft or third-party.


Question: How do I submit bug reports?

Answer: Email is best. Grab my email address from the comment section at the top of the script. Please be VERY detailed. Please include screen shots if possible, and ALWAYS include the log file. If the script will start, select option 96, “Report a bug/problem with this script”. If you’re not using the latest version of the script, please download it from the Downloads section below and see if you can duplicate the problem before reporting it.


Question: What if my server doesn’t have Internet access?

Answer: Fear not. Download the required files using either the -DownloadOnly or -DownloadAll options from another machine and place them in the TargetFolder, which is c:\_install by default. The script looks to see if the file is available locally before attempting to download. An exception to this is the latest cumulative update, which is always downloaded, since the URL and file name don’t change, even when the version does.


Question: When I run the script again, I get “Script already running”

Answer: This is because the script didn’t exit gracefully. Many reasons this can happen, such as rebooting the server while it’s still running. If you’re positive it’s not running anywhere else (including by other users logged into the same server), run the script with the -ClearRunningStatus switch to clear that flag. Then run it as normal.


Question: Is there an option to specify where (i.e. path) all of the various tools are installed?

Answer: No. And not for a lack of trying. Some tools don’t support automated installs with a specified path. And some of those that DO, actually still dump some core files in a “default” location. The more I tried to come up with the solution, the more I realized that it would entail a substantial amount of overhead in the script.


Question: Why does the script report an unsupported version of .NET Framework?

Answer: Because Lync Server 2013 and Skype for Business Server 2015 don’t support the version detected. Once they do, I’ll adjust the script accordingly.


Download

v4.6 – 01-19-2018 – Set-CsFeatures.v4.6.zip

v4.5 – 12-21-2017 – Set-CsFeatures.v4.5.zip

v4.4 – 11-12-2017 – Set-CsFeatures.v4.40.zip

v4.30 – 10-11-2017 – Set-CsFeatures.v4.30.zip

v4.20 – 09-04-2017 – Set-CsFeatures.v4.20.zip

v4.10 – 05-15-2017 – Set-CsFeatures.v4.10.zip

v4.09 – 05-13-2017 – Set-CsFeatures.v4.09.zip

v4.08 – 04-19-2017 – Set-CsFeatures.v4.08.zip

v4.07 – 04-14-2017 – Set-CsFeatures.v4.07.zip

v4.06 – 02-05-2017 – Set-CsFeatures.v4.06.zip

v4.05 – 11-04-2016 – Set-CsFeatures.v4.05.zip

v4.04 – 11-02-2016 – Set-CsFeatures.v4.04.zip

v4.03 – 11-01-2016 – Set-CsFeatures.v4.03.zip

v4.02 – 10-28-2016 – Set-CsFeatures.v4.02.zip

v4.01 – 10-25-2016 – Set-CsFeatures.v4.01.zip

v4.0 – 10-24-2016 – Set-CsFeatures.v4.0.zip

Changelog

See the changelog for information on what’s changed/included in each version.