Thursday, 12 September 2019

Set LineURI via PowerShell Teams

Set the LineURI for a user using calling plans (Telstra Calling)

1. Need the location ID
Get-CsOnlineLisLocation


2. Set-CsOlineVoiceUser -Identity name -LocationID GUID-from-step-1 -telephonenumber +E.164-format



Monday, 5 August 2019

Office 365 IP Address and URL Web service

Using the Office 365 IP Address and URL Web service to pull the latest information.

The website above has all the listed parameters that you can use to grab specific data, but here are the shortcuts I use for specific products:


Common parameters

These parameters are common across all the web service methods:
  • format= JSON | CSV - By default, the returned data format is JSON. Use this optional parameter to return the data in comma-separated values (CSV) format.
  • ClientRequestId=guid - A required GUID that you generate for client association. You should generate a GUID for each machine that calls the web service. Do not use the GUIDs shown in the following examples because they may be blocked by the web service in the future. GUID format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where x represents a hexadecimal number. To generate a GUID, use the New-Guid PowerShell command.
First you need to generate a GUID, from PowerShell run the following:
New-Guid


Endpoints web method

The endpoints web method returns all records for IP address ranges and URLs that make up the Office 365 service. While the latest data from the endpoints web method should be used for network device configuration, the data can be cached for up to 30 days after it is published due to the advance notice provided for additions. We recommend you only call the endpoints web method again when the version web method indicates a new version of the data is available.
Parameters for the endpoints web method are:
  • ServiceAreas= Common | Exchange | SharePoint | Skype - A comma-separated list of service areas. Valid items are CommonExchangeSharePoint, and Skype. Because Common service area items are a prerequisite for all other service areas, the web service will always include them. If you do not include this parameter, all service areas are returned.

Skype and Teams CSV output
https://endpoints.office.com/endpoints/Worldwide?ServiceAreas=Skype&ClientRequestId=5017483f-93b2-4051-b08e-d8af77ab2f2d&Format=CSV

Exchange CSV output
https://endpoints.office.com/endpoints/Worldwide?ServiceAreas=Exchange&ClientRequestId=5017483f-93b2-4051-b08e-d8af77ab2f2d&Format=CSV

Import into Excel You can also use the above URL to import data straight into Excel
1. Open new Excel Workbook, select "Data"

2. Select "From Web"

3. Past in value for required O365 Workflow, click "OK"
4. Make any required changes to the data to be imported, click "Load"

5. Data import complete for selected O365 Workflow.

Friday, 2 August 2019

"Open File" Dialog

Migrating uses between Skype for Business and Skype Online lately and have been migrating in batches/pilot groups.

Having gotten sick of upding the filename or file location in the powershell script, i went searching and found a nice article on how to create a open file dialog box.

https://ilovepowershell.com/2017/03/08/how-to-open-a-directory-chooser-window-with-powershell/

I'm sure there is a better/easier to complete, but this worked for me.
++++++++++++++++++++++++++++++++++++++++++++
$connect = Read-host "Connect to O365 Skype Online: [Y|N]?"
if($connect -like "Y")
{
Import-Module SkypeOnlineConnector
$userCredential = Get-Credential
$sfbSession = New-CsOnlineSession -Credential $userCredential
Import-PSSession $sfbSession
}
if($userCredential.UserName -eq $nul)
{
write-host "No Crediential Set for move" -ForegroundColor Red

else
{
write-host "connected user"
}

$openChooser = New-Object -TypeName System.Windows.Forms.OpenFileDialog
$openChooser.ShowDialog()
$fileimport = import-csv $openChooser.FileName
foreach($i in $fileimport)
{
write-host -ForegroundColor Cyan $i.displayname -NoNewline
write-host " is currently being migrated"
}

++++++++++++++++++++++++++++++++++++++++++++

Monday, 1 July 2019

Skype Server Patch CU Downloads

As you know MS remove old CU patches and re-use the same KB Number to release new Skype for Business Patches (CU's).  I had found this link in the past but had managed to loose it..

Direct link to OneDrive

Thanks to Martin Boam for keeping the old CU's available.

Tuesday, 11 June 2019

Get-CsVoiceRoute - View PstnGatewayLists

Always loosing this command, and takes me a few tries to find it again for what I'm looking for.

In the CSCP when looking at the associated trunks of a voice route, the trunk names are "truncated" and not fully displayed.



The command "Get-CsVoiceRoute" will display the full list of gateways that have been associated..


The above images is showing three (3) PstnGateways configured for the "Emergency" voice route

Monday, 20 May 2019

Call Dropping at 30 seconds when placed on hold

This has been done on many other blogs around the place, but I ALWAYS seem to get the first step wrong.

When trying to change the following values:
-RTCPActiveCalls
-RTCPCallsOnHold
-EnableSessionTimer

First step is "New-CsTrunkConfiguration", NOT "Set-CsTrunkConfiguration"

Trying to run the "Set-CsTrunkConfiguration" first will result in errors like below

Tuesday, 26 March 2019

How to extract and analyze the errors from the hybrid migration report using PowerShell

Found this article, whilst trying to figure out what mailbox items were causing issues with a migration from on-premises to Office 365.

How to extract and analyze the errors from the hybrid migration report using PowerShell

Command Examples:
Get-MoveRequestStatistics -IncludeReport -Diagnostic verbose | Export-CliXml .\move_report.xml

$r=Import-Clixml .\move_report.xml

$i=0;$r.report.Failures | foreach { $_ | Select-Object @{name="index";expression={$i}},failuretype,Message,timestamp;$i++} | ft 

$r.Report.Failures[4]

$r.Report.Failures| select -last 2

Teams Tracing/Logging

This post is to outline the logging/tracing items for a MS Teams environment, most of the tracing will be from the Teams Client/Web App/etc....