Showing posts with label Tool. Show all posts
Showing posts with label Tool. Show all posts

Friday, 28 February 2025

Microsoft Places Viewer

I’ve been playing around a bit recently with Microsoft Places configuration. I’ve found viewing the Places configuration in PowerShell to be a bit cumbersome. The configuration has a degree of hierarchy built into it and when you list it up in PowerShell as objects, and you are required to match all the ParentIds yourself, it's quite painful. To try and help with this, I created a little PowerShell script that allows you to view your PlacesV3 config in a clearer tree format.


Microsoft Places Viewer

Microsoft Places Viewer is simple to use tool for viewing your Microsoft Places configuration. It allows you to connect and list the current Microsoft Places data and display it in a hierarchical tree format:



If there are rooms or spaces that don’t have parents associated with them, the tool will display them under the "Orphaned Items" tree node. This allows you to easily troubleshoot the rooms and spaces that are not configured correctly in your tenancy. When you click on any of the nodes on the tree the properties for that object will be displayed on the right hand side of the screen. This allows you to easily check your configuration for each object.

 

DOWNLOAD FROM GITHUB

 

Version 1.00 – Initial Release.

Version 2.00 – Editing Capabilities Added.

  • Create Buildings, Floors, Sections, and Desks via right-click in the object tree or the dropdown menu using the "Create New" button.
  • Delete Buildings, Floors, Sections, and Desks by right-clicking on an object in the tree.
  • Edit attributes of Buildings, Floors, Sections, and Desks using the "Edit Value" button for editable fields. If you want to know what the attributes do, check out this blog post: https://www.myteamslab.com/2025/03/microsoft-place-settings.html
  • View and manage Individual Desks (in addition to Workspace/Space objects).
  • Individual Desks are now displayed in grey, and Desk Pools (Workspaces) appear in blue for easier differentiation.

Version 2.01 - Enhancements

  • When adding a Section using the Create New button the Floor selection dialog, the Floor combo box also includes the building name.
  • Updated the section drop down loading method for in the Add Desk dialog to improve performance.
  • Updated the error message when adding a desk with an Mailbox Email Address that doesn't exist or is not of Desk Type.

How to Run the Tool

The tool runs on top of PowerShell 7, which is also a prerequisite for the Microsoft Places PowerShell module. To install the Places PowerShell module, do the following:

Note: If you don't have PowerShell 7 installed you will need to do this first. Get it here: https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows


Step 1: If you don’t already have the Microsoft Places PowerShell Module installed, do the following:

Run PowerShell 7 as Administrator (Right Click on the App > Select "Run as administrator"):


 

Step 2: Run the following PowerShell command to install the Microsoft Places PowerShell module:

Install-Module -Name MicrosoftPlaces -Force

 

Step 3: Download a copy of the Microsoft Places Viewer tool from Github. Before running the script you may need to “Unblock” it in the Windows file properties. To do this, right click on the file and open the Properties window. In the General tab there is a Check Box marked as “Unblock”. You need to check this box:


 

Step 4: Run the script in the PowerShell 7 window:

Note: You can’t use the Right Click and Run with PowerShell option as this will likely execute it using PowerShell 5, which is not supported.

Change directory to the directory containing the script (change the path to the folder where the script is on your PC):

cd "C:\Users\Name\Documents\CoolScripts"


Run the script. You should see the Microsoft Places Viewer GUI appear:

.\MicrsosoftPlacesViewer-1.00.ps1

 

Step 5: Click the Connect button:

A browser window will now pop up asking for credentials. Enter the credentials for your M365 tenancy in the browser window and sign in:


Step 6: Click the Get Data button:



Individual Desks vs Desk Pools (Workspace/Space)


Exchange PowerShell and Places PowerShell both include a "Desk" object, which represents an individual desk designed for one person. This differs from workspaces or spaces, which are configured to represent multiple desks based on a specified capacity.

Note: Microsoft use a confusing variety of words to describe these things which take some getting used to. Workspaces which contain multiple desks can  be described as workspaces, spaces, or desk pools.

 

Individual Desk Creation

Individual Desks are created in Exchange as a resource account with the Type “Desk”. Here is an example of the configuration:


Add a Desk:

New-Mailbox -Room -Alias Desk5 -Name "Desk5" | Set-Mailbox -Type Desk

To integrate an Exchange Desk account with Places, create a Desk object within the Places configuration. You can use the Microsoft Places Viewer tool to accomplish this with the following steps:

Select Desk as the type of object to create and click the Create New button.


After clicking "Create New," a dialog box will appear for you to complete. To link the Places configuration to the Exchange configuration, enter the Desk resource account's email address in the "Mailbox Email Address" field.


After completing these steps, the Individual Desk will appear in the Exchange version of the Places Finder. While it is expected to show up in the Teams App Places Finder in the future, this feature is not yet available.

 

Currently, in the Outlook Places Finder, an Individual Desk looks like this:

1. Open your calendar and select the location icon.

2. The Places Card will be displayed.

3. Click the “Book Now” link button to proceed.


The Outlook Desk booking interface will appear (note that this is different from the Places Desk Finder):


You may need to select "Browse more on Places Finder," which will display additional available Desk locations, including both Individual Desks and Desk Pools (Workspaces).

 

Desk Pools (Workspace/Space) Creation

For Desk Pools (also known as Workspaces or Spaces), the object created in Exchange is of the "Workspace" type. The "Enforce Capacity" flag must be set to true on the account. Below is an example of the configuration:

New-Mailbox -Room -Alias Deskpool06 -Name "Desk Pool 6" | Set-Mailbox -Type Workspace

Set-CalendarProcessing -Identity Deskpool06 -EnforceCapacity $True

 

After some time (usually a few hours), the workspace object from Exchange will appear in the Places configuration. In the Microsoft Places Viewer tool, it will be listed as a Desk Pool (Space) object under the Orphaned Items tree section. To enable users to utilize the Desk Pool in Places, a ParentId must be assigned to it in Microsoft Places.


At this point, you can use the Microsoft Places Viewer tool to configure the Capacity and ParentId for the Desk Pool. Follow these steps to set the Capacity on the Desk Pool:



Enter the number of people that the space will support:


 Edit the ParentId on the Desk Pool:


 Add the ParentId of the section object that you want the Desk Pool to be associated with:


Now that the Desk Pool will have the ParentId and will move underneath the Section that you selected:


After this is done, the Desk Pool will start showing up in the Microsoft Places Desk Finder.

 

The Wrap Up

I hope you’ve enjoyed your stay at this place, reading about places and how to better place yourself for success within the Places ecosystem. May the place be with you in every place you go. 🖖




Read more →

Monday, 26 March 2018

Building an Edge Server Port Monitor with Azure Function Apps – Part 3

This blog is an expansion on the previous Part 1 and Part 2 posts found here and here. The process of setting up the Function App for this part 3 section is the same as was documented in Part 1 and 2.  I suggest you head over to the first two parts and give them a good read before moving onto this post.

In part 3 we will be adding to the Function App so it can save data over time that we can use to graph and manipulate in Power Bi. To do this we will expand the application to do the following:
  • Save all port test results to Azure Storage tables for analysis.
  • Use Power Bi to connect to Azure Storage Tables and create nice graphs showing the status of Edge servers over a period of time.

Just like in Part 2 we will use the Azure Storage Tables module for Powershell to allow our application to keep both a short term memory for logging errors as well as a long term memory for logging all port testing attempts.

Step 1
To begin with follow Steps 1 through 5 of Part 2.

Step 2 – Download a copy of the script
You can grab a copy of the script I wrote for part 3 from here:



Step 3 - Update variables

Update the Storage Account details in the Powershell Script.

IMPORTANT: These settings are slightly different than in Part 2. In this case we have 2 different storage tables: one of them stores the current state of edge servers (same as part 2) and the other one stores all attempts into a separate table (which we will use for analysis in Power Bi):
#AZURE STORAGE VARIABLES######
#SETTINGS ARE FOUND UNDER PLATFORM FEATURES TAB -> PROPERTIES
$subscriptionName = "Visual Studio Premium with MSDN"  #SUBSCRIPTION NAME
$resourceGroup = "EdgePortTester-Part003"      #RESOURCE GROUP
$storageAccount = "edgeporttesterp8dbf" #STORAGE ACCOUNT NAME
$tableName = "EdgeTesterTablePart3Current"      #CHOOSE A NAME 1
$tableName2 = "EdgeTesterTablePart3Results"      #CHOOSE A NAME 2
$partitionKey = "EdgeTesterStoragePart3Current"      #CHOOSE A NAME 1
$partitionKey2 = "EdgeTesterStoragePart3Results"      #CHOOSE A NAME 2
$storageAccountKey = "7asdkjhasd7KHDKJHAS0dsflasdnnlasd099asdpncsdlknclLJSDLjbadksdjbfa9su9duhoasivRqXA615jQ=="             #STORAGE ACCOUNT > ACCESS KEYS
#AZURE STORAGE VARIABLE END######

Don’t forget to fill in your Mail Jet email account information (as you did in Part 1) and add your Skype for Business Edge server's details. See Part 1 for more details. Enter your Mail Jet API Key (Username) and Secret Key (Password) and paste them into the following section of the script:

#MAIL JET USERNAME/PASSWORD#######
$emailUsername = "kjh3k23h4kjhkj37573f8f020879dff7"     
$emailPassword = "9898f98fhdjkkdjh46cd418100075a3b"
#EMAIL ADDRESS TO SEND ERRORS FROM
$SENDEREMAIL = "YourRealEmailAddress@domain.com"
#EMAIL ADDRESS TO SEND ERRORS TO
$RECIPIENTEMAIL = "YourRealEmailAddress@domain.com"
################################## 

Edit the Skype for Business Edge server details as required. These are entered as an array of hash tables. The sections highlighted in yellow can be changed. In this case the application is monitoring 2 Edge servers, one in Melbourne and one in Sydney.

Location
ServerName
ServerRole
DestinationPort
Protocol
Melbourne
147.70.50.10
Federation
5061
TCP
Melbourne
147.70.50.10
Access Edge
443
TCP
Melbourne
147.70.50.11
Web Conferencing
443
TCP
Melbourne
147.70.50.12
AV Edge
443
TCP
Sydney
147.70.60.20
Federation
5061
TCP
Sydney
147.70.60.20
Access Edge
443
TCP
Sydney
147.70.60.21
Web Conferencing
443
TCP
Sydney
147.70.60.22
AV Edge
443
TCP
Note: The script only supports testing TCP ports at this time.

#SETUP EACH SERVER
$Records = @(@{"Location" = "Melbourne"; "ServerName" = "147.70.50.10"; "ServerRole" = "Federation"; "DestinationPort" = "5061"; "Protocol" = "TCP"})
$Records += @(@{"Location" = "Melbourne"; "ServerName" = "147.70.50.10"; "ServerRole" = "Access Edge"; "DestinationPort" = "443"; "Protocol" = "TCP"})
$Records += @(@{"Location" = "Melbourne"; "ServerName" = "147.70.50.11"; "ServerRole" = "Web Conferencing"; "DestinationPort" = "443"; "Protocol" = "TCP"})
$Records += @(@{"Location" = "Melbourne"; "ServerName" = "147.70.50.12"; "ServerRole" = "AV Edge"; "DestinationPort" = "443"; "Protocol" = "TCP"})

$Records += @(@{"Location" = "Sydney"; "ServerName" = "147.70.60.20"; "ServerRole" = "Federation"; "DestinationPort" = "5061"; "Protocol" = "TCP"})
$Records += @(@{"Location" = "Sydney"; "ServerName" = "147.70.60.20"; "ServerRole" = "Access Edge"; "DestinationPort" = "443"; "Protocol" = "TCP"})
$Records += @(@{"Location" = "Sydney"; "ServerName" = "147.70.60.21"; "ServerRole" = "Web Conferencing"; "DestinationPort" = "443"; "Protocol" = "TCP"})
$Records += @(@{"Location" = "Sydney"; "ServerName" = "147.70.60.22"; "ServerRole" = "AV Edge"; "DestinationPort" = "443"; "Protocol" = "TCP"})


Step 4 – Parameter Tweaking
This version of the script like part 2 has a few settings that you can tweak. These are how many failures on each port is required before an email gets sent ($RequiredNumberOfFailuresBeforeEmail). There is also a setting for consolidating multiple errors or recoveries into a single email ($consolidateEmailsOnError and $consolidateEmailsOnError). Set these as you like:

#This is the number of required port check failures before an email is sent out
$RequiredNumberOfFailuresBeforeEmail = 3

#Send 1 email rather than one per record
$consolidateEmailsOnError = $true
$consolidateEmailsOnRecover = $true

Step 5 - Download Azure Storage Explorer
Now let your Function Application run for a while and gather some data. At any time you can look into your Function Apps Table Storage using Azure Storage Explorer. This application will show you all of the rows in your storage tables and allow you to see and edit as you see fit. You can download your free copy from here:




Once you have logged into your Azure Account within Azure Storage Explorer you can dig into your storage tables by selecting Storage Accounts > (Storage Resource Group Name) > Tables to see your table data. Note, there will be no table or data until you actually start running the Function App.

Step 6 - Download Power Bi
Now download a copy of Power BI for desktop:




Install the downloaded Power Bi on your PC.

Step 7 - Open Power Bi
Open Power Bi Desktop and you will be greeted with a splash screen and dialog. Click on the “Get Data” button:




Step 8 - Import Data
The Get Data dialog will then be displayed. Select “Azure Table Storage” from the list and click the “Connect” button:



Step 8 - Account URL dialog
Power Bi will now request an Account Name or URL to connect to:



Step 9 - Find Account URL
The account name for the dialog above can be found in the Azure Portal under the storage account Overview > Tables section:



The “Table service endpoint” is the value you will need to fill in the dialog with:



Step 10 - Paste in URL
Enter the Table service endpoint into the “Azure Table Storage” dialog and click “OK”:



Step 11 - Enter Account Key
You will now be asked to enter your “Account Key”:



This can be found under the Storage Account > Access Keys section in the Azure Portal:



Enter the Account Key and click “Connect”:



Step 12 - Load Data
Power Bi will now connect to your Table Storage and list up all of the Tables in there. Select the Results table and click “Load”:



Step 13 - Not all data is displayed
Power Bi will now download your data into the application. You may notice though that all of the columns that you can see in Azure Storage Explorer will not be displayed:



Step 14 - Edit Query
To be able to see all of the columns you need to do a little extra work. On the right hand side of the screen, Right Click on Table name at the top of the top of the column names listed and select “Edit Query”:



Step 15 - Expand content column
You will now see an extended view of the data that includes a “Content” Column:



On the top right of the Column click on the double arrow “expand” button:




You will now get a full list of all of the additional columns available that are stored in Table Storage as a Json blob. Tick the Columns that you want to include in your graphs and data analysis and click OK:



Step 16 - All columns are now available
You will now see the extra data columns:



 Click the “Close and Apply” button from the Home Tab:



The full array of data is now available for you to do as you please with:



Step 18 - Make charts
Back on the "Report" tab you can now put together some nice looking graphs of your data. Here is an example of a Pie Chart and a Bar Chart showing information about the number of errors for each role:



To create these graphs you use the following settings:




From here you can play with the data in Power Bi and make whatever graph you like (I included location in the data so you can even plot your Edge servers on a map). This is what makes Power Bi so powerful!

The Wrap Up

This post ends my series on creating an Edge port monitor with Azure Function Apps. I hope that in addition to helping you monitor your edge servers, this has been informative and taught you some new skills that might help in the future when making your own Function Apps.



Read more →

Popular Posts