Scripts · PowerShell

Export-SimplePlacesVisual

Print or save a text tree of the Microsoft Places directory of buildings, floors, sections, rooms, spaces, and desks.

View on GitHub

What it is

A PowerShell script that reads the Microsoft Places directory with the Places PowerShell module and prints its hierarchy as an indented text tree. You can include each place's PlaceId, start from a specific ancestor such as one building or floor, and save the output to a file.

Why use it

  • See the full Places structure of a tenant at a glance instead of browsing it object by object.
  • Add each place's PlaceId to the output when you need to reference specific places.
  • Start from any building, floor, or other place with -AncestorId to focus on one part of the hierarchy.

How to use it

  1. Install the Places PowerShell module and connect to the Places service.
  2. Run the script. Add -IncludePlaceId to show IDs, -AncestorId to start from one place, or -OutputFileName to save the output (the script appends .html unless the name already ends in .html or .htm):
.\Export-SimplePlacesVisual.ps1 -IncludePlaceId

Prerequisites

  • Places PowerShell module installed and an authenticated Places session