Skip to content

Instantly share code, notes, and snippets.

@SweetAsNZ
Created November 19, 2025 21:08
Show Gist options
  • Select an option

  • Save SweetAsNZ/044bbc0b857ced346051754a19037550 to your computer and use it in GitHub Desktop.

Select an option

Save SweetAsNZ/044bbc0b857ced346051754a19037550 to your computer and use it in GitHub Desktop.
nable Building Parameter in Microsoft Places
function Set-MSPlacesBuildings{
<#
.SYNOPISIS
Enable Building Parameter in MS Places
.DESCRIPTION
This script connects to Microsoft Graph and enables the Building parameter at the tenant level for Microsoft Places
.EXAMPLES
Set-MSPlacesBuildings
#>[CmdletBinding()]
param ()
# Import the MS Graph module if not already imported
if (-not (Get-Module -Name Microsoft.Graph -ListAvailable)) {
Install-Module -Name Microsoft.Graph -Scope CurrentUser -Force
}
Import-Module Microsoft.Graph
# Connect to Microsoft Graph
Connect-MgGraph -Scopes "Places.ReadWrite.All"
# Set Building at Tenant Level
try {
Set-PlacesSettings -EnableBuilding 'Default:true'
Write-Output "Building parameter enabled at tenant level."
} catch {
Write-Error "Failed to update building: $_"
}
# Disconnect from Microsoft Graph
#Disconnect-MgGraph
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment