tirsdag den 30. august 2016

SKYPE for Business - custom shortcuts

Hello - ever wondered who on earth chose that the keyboard shortcut used for bringing SKYPE for Business client in focus was changed from WIN+Y - to the "Octopus" version CTRL+ALT+SHIFT+3 - well i did.

And since nobody made it possible to customize this i wrote up this little guide on how to customize this across all your users.

So instead of:

 You get:

Sadly there is no simple RegKey or similar for this, so best option imo is to use 3.party autohotkey open source project.

First thing to do is to install/ deploy autohotkey.
Download from here:

To deploy via network make a startup script in a GPO
(Note version number in command)
AutoHotkey112401_Install.exe /S
This will install AutoHotkey in default location.
(Please refer to the autohotkey forum for more options and switches.)

Next step is to create a script file to make things work - Autohotkey is script controlled, and the sky is the limit, when it comes to creating hotkeys and hotstrings
  • 1. Right-Click on your desktop.
  • 2. Find "New" in the menu.
  • 3. Click "AutoHotkey Script" inside the "New" menu.
  • 4. Give the script a new name. Note: It must end with a .ahk extension. Ex. SFB.ahk
  • 5. Find the newly created file on your desktop and Right-Click it.
  • 6. Click "Edit Script".
  • 7. A window should have popped up, probably Notepad. If so, SUCCESS! 
Now the fun begins - and please refer to forum or helpfile for fullsyntax - but I will simply give you the content for at script file that defines the good old WIN+Y shotcut

Thanks to my friend Daniel, for supplying an extra great little addition to the script.
With this added, you can select/ mark a phonenumber anywhere in Windows and simply press "WINDOWS"+V and SKYPE4B will open and dial the selected number - excellent feature.

; My SKYPE For Business "Bring to Focus" shortcut
   Send, ^!+3

Send {Esc}
; DAL's nifty addiditons :)
                      send, ^c

                      Send, ^!+3
                      Send {esc}

                      TrimmedClipboard := Trim(Clipboard)
                      SendRaw, %TrimmedClipboard%

                      Sleep 1500

                      Send {Enter}

The extra {esc} is there to prevent "file" menu from getting activated, so cursor always will be positioned in the search field.
Put the above in the SFB.ahk fil and save it, to autorun put it in your startup folder - in Win10 just press "WINDOWS" + R to open RUN and type "shell:startup" this opens the startup folder, here you place the AHK file
Now you can choose to "deploy" this SFB.ahk file to your users and put it in THEIR startup folder, my favorite way is to use Group Policy Preferences
Put the script file on a file-server, and create a "files" item in GPMC.

Path to startup folder would be %AppDataDir%\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

The "File" item is found in the GPMC here:


tirsdag den 23. august 2016

Simple URL's give 404 on SKYPE for Business

Worked together with a customer today to troubleshoot a brand new deployed SKYPE for Business pool, with malfunctioning Simple URL's. Basically all simple URL's were defunct, both internally and via the reverse proxy, https://dialin.sipdomain.com gave 403 access denied, and all URL's with directiry name like https://meet.sipdomain.com/init or even https://ext-web.sipdomain.com/cscp all returned "Server Error" 404 errors.

After digging (a lot) about in the simple URL's, and doing certificate reapply's, iisreset's and a lot of other deadends i came to think of the IIS rewrite module installed during bootstrapper/ setup - so decided to give it a go - removed it from the add/remove, and the ran bootstrapper. And TADAA.. now everything was working like a charm again.

So process:

1. Go to add/ remove
2. Locate IIS rewrite 2.0 module - and select uninstall
3. Go to "SKYPE for Business server deployment wizard"
4. Run setup

No reboot neeeded (althoug removal of the module actually suggests it)

Happy SKYPE'ing

mandag den 22. august 2016

Common powershell onliners for Skype4B

Wery often my customers ask for my little list of usefull powershell commands, and one-liners for basic and common administrative tasks when managing SKYPE for Business.
I always urge the admins to move to powershell, but often hear the argument that commands are forgotten and they get the syntax wrong because they do not use it often enough.

So hoping that this could be usefull I decided to put together a (work in progress) article collecting my most often used cmd-lets with examples.

Please comment or ask for addiditons..

And as always happy SKYPE'ing.

For a FULL CMD-LET reference please refer to

I will put the commands in categories - and the basic idea is that you could copy this to a ps1 file and when open in Powershell ISE - use "run selction" all the hash-marked lines are supposed to be explanatory :)
## For a section and  #for a description of the following command.

##General CMD info
#Get all cmdlets for SFB that contains -CsGet-Command *-Cs* -CommandType cmdlet -Module Lync#Get all cmdlets that contains userGet-Command *user* -CommandType cmdlet -Module Lync#Get specific syntax on how to use CMDGet-Help Get-CsUser -Examples#Use -Online to open the TechNet website for specific CMD-LETGet-Help Get-CsUser -Online
##Manage Users
#Enable New user
enable-csuser -identity domain\init -registrarpool pool@fqdn.com -sipaddresstype emailaddress
#Enable Enterprise voice
set-csuser -identity "username" -enterprisevoiceenabled $TRUE -lineuri "tel:+4529337043"
#Temoporarily disable userSet-CsUser -Identity "Username" -Enabled $False#Re-enable disabled userSet-CsUser -Identity "Username" -Enabled $True#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
#Find user disabled in AD , but still active on SFB server
Get-CsAdUser -ResultSize Unlimited | Where-Object {$_.UserAccountControl -match "AccountDisabled" -and $_.Enabled -eq $true} | Format-Table Name,Enabled,SipAddress -auto
#Get users from AD in specific OU in order to enable (via pipe)
GET-Aduser –filter * -searchbase 'OU=Users,OU=Denmark,DC=spinne,DC=local' | Foreach { ENABLE-CSAduser –identity $_.Name –RegistrarPool 'poolFQDN' –sipaddresstype FirstnameLastname –sipdomain sipdomain.com }
#Import Photo to AD$photo = [byte[]](Get-Content C:\thomas.jpg -Encoding byte)Set-ADUser domain\init -Replace @{thumbnailPhoto=$photo}#Assign pinSet-CsClientPin "Username" -Pin 12345
##Policies#View client policyget-csclientpolicy -identity "policyname"#grant policy to all users Get-CsUser | Grant-CsClientPolicy -PolicyName "policy"#grant policy to users of specifik departmentGet-CsUser -LDAPFilter "Department=Eksempel" | Grant-CsClientPolicy -PolicyName "policy"#Create new policy with default settingsnew-csclientpolicy -identity "Newpolicyname"#change policy Boolean valuesset-csclientpolicy -enableeventlogging $true#change other values in policySet-csclientpolicy -tracinglevel Full 
#List the CMS replication status for each Lync Server
#Force replication to take place
#Get Users Pool infoGet-CsUserPoolInfo sip:username@domain.com
 ##Manage Services#Start any stopped servicesGet-CsWindowsService -ExcludeActivityLevel | where {$_.Status -like "Stopped"} | Start-CsWindowsService#Start all servicesstart-cswindowsservice#Stop all servicesstop-cswindowsservice
##Address Book Sync
#Write changes in backend DB to the address book filesUpdate-CsAddressBook # Synchronize data between AD and Lync backend DB (rtcab)Update-CsUserDatabase
## Manage Announcement Service
#New Announcement with forward to SIP AddressNew-CsAnnouncement -Parent service:ApplicationServer:pool@fqdn.com -Name "<Name>" -TargetUri sip:<sip address>#New Announcement with forward to PSTN-NumberNew-CsAnnouncement -Parent service:ApplicationServer:pool@fqdn.com -Name "<Name>" -TargetUri "sip:+4529337043@sipdomain.com;user=phone"#New Announcement to Play Audio FileImport-CsAnnouncementFile  -Parent "service:ApplicationServer:pool@fqdn.com" -FileName "<AudioFile.wav>" -Content (Get-Content "<path to audio file>" -ReadCount 0 -Encoding Byte) New-CsAnnouncement -Identity "service:ApplicationServer:pool@fqdn.com" -Name "<Name>" -AudioFilePrompt "<AudioFile.wav>"