Skip to content

Latest commit

 

History

History
110 lines (80 loc) · 8.05 KB

skype-for-business.md

File metadata and controls

110 lines (80 loc) · 8.05 KB

src: https://github.com/chgeuer/mybookmarks/blob/master/skype-for-business.md / http://tinyurl.com/s4bimc

Playing with O365 and Skype for Business

Get an O365 trial/development tenant

Lync / Skype for Business Gotchas

  • When appending ?sl=1 query string to a meeting invitation URL (e.g. https://join.microsoft.com/meet/demouser120/FF66XXQ?sl=1, it forces anonymous users into the web app. See also this
  • "UCWA" (Unified Communications Web API) not supported by O365

Management APIs

Installation of all the packages

Make sure to install the Beta sign-in assistant, not the RTW 7.250.4303.0. Azure Active Directory Module for Windows PowerShell has a launch condition MSOIDCRLVERSION >= "7.250.4358", which is not satisfied by the RTW version. If you are a smart guy and use something like Orca or SuperOrca to remove the launch condition, running Connect-MsolService creates stuff like The type initializer for 'Microsoft.Online.Administration.Automation.ConnectMsolService' threw an exception. So just use the beta.

When you plan to use all the MSOnline and Powershell bits from within a C# app, the Powershell Runtime in your .NET app is most certainly a 32bit runtime. The MSOnline Powershell Module is only in the 64-bit folder (C:\Windows\System32\WindowsPowerShell\v1.0\Modules), so copy the bits over:

Copy-Item -Recurse -Destination "C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules" -Path "C:\Windows\System32\WindowsPowerShell\v1.0\Modules\MSOnline" 
Copy-Item -Recurse -Destination "C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules" -Path "C:\Windows\System32\WindowsPowerShell\v1.0\Modules\MSOnlineExtended" 

After that copy operation, loading the modules should work:

PS C:\> Import-Module MSOnline
PS C:\> Import-Module "C:\Program Files\Common Files\Skype for Business Online\Modules\SkypeOnlineConnector\SkypeOnlineConnector.psd1"
PS C:\> Get-Module

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
Manifest   3.0.0.0    Microsoft.WSMan.Management          {Connect-WSMan, Disable-WSManCredSSP, Disconnect-WSMan, En...
Manifest   1.0        MSOnline                            {Add-MsolAdministrativeUnitMember, Add-MsolForeignGroupToR...
Script     6.0.0.0    SkypeOnlineConnector                {New-CsOnlineSession, Set-WinRMNetworkDelayMS}

Powershell commands

Sign in to MS Online

$credential = Get-Credential "[email protected]"
Connect-MsolService  -Credential $credential

List unlicensed users

Get-MsolUser -UnlicensedUsersOnly

Create a user

New-MsolUser -UserPrincipalName demo1@chgeuerimcdemo.onmicrosoft.com -DisplayName 'Demo User 1' -FirstName "Chris" -LastName "Geuer-Pollmann" -LicenseAssignment chgeuerimcdemo:ENTERPRISEPACK -UsageLocation DE

Password UserPrincipalName                    DisplayName isLicensed
-------- -----------------                    ----------- ----------
Hogo3136 demo1@chgeuerimcdemo.onmicrosoft.com Demo User 1 True

Manage Skype

$session = New-CsOnlineSession -Credential $credential 
Import-PSSession $session
Get-CsTenant | select DisplayName, TenantId, DomainUrlMap

Get-CsOnlineUser | select UserPrincipalName

Enable-CsUser

Azure AD