Edit

Share via


Set-CsTeamsWorkLocationDetectionPolicy

This cmdlet is used to update an instance of TeamsWorkLocationDetectionPolicy. This policy can be used to tailor the Automatic Update of work location experience in Microsoft Teams. When the EnableWorkLocationDetection parameter is enabled, a user’s work location is updated based on their interaction with organization‑managed networks and devices, such as desks or peripherals configured by IT administrators. To learn how to configure desks to certain work location, please see Configure buildings and floors - Microsoft Places | Microsoft Learn.

Microsoft processes this information in accordance with the Microsoft Privacy Statement to provide a consistent location‑based experience and support hybrid work scenarios in Microsoft 365.

Syntax

Default (Default)

Set-CsTeamsWorkLocationDetectionPolicy
    [-EnableWorkLocationDetection <Boolean>]
    [-UserSettingsDefault <String>]
    [-Identity] <String>
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Updates any of the properties of an existing instance of TeamsWorkLocationDetectionPolicy.

Examples

Example 1

PS> Set-CsTeamsWorkLocationDetectionPolicy -Identity ExistingPolicyInstance -EnableWorkLocationDetection $true

Updates the EnableWorkLocationDetection field of a given policy.

Example 2

PS> Set-CsTeamsWorkLocationDetectionPolicy -Identity ExistingPolicyInstance -UserSettingsDefault Enabled

Updates the UserSettingsDefault field of a given policy to Enabled.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableWorkLocationDetection

This parameter specifies whether Microsoft Teams determines a user’s work location based on interaction with organization‑managed networks and devices. When enabled, users' work location gets updated using signals from administrator‑configured resources, such as desks or peripherals managed by the organization. This parameter does not collect or use geographic location data from users’ personal or mobile devices. Location information is used to support consistent location‑based experiences in Microsoft Teams and Microsoft 365 and is processed in accordance with the Microsoft Privacy Statement.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Suppresses the display of any non-fatal error message that might arise when running the command.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Identity

Name of the new policy instance to be updated.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UserSettingsDefault

This parameter specifies the default user consent behavior when automatic update of work location is enabled and only applies to WiFi, and has no impact on device-based detection.

  • Disabled (default): Users must explicitly opt in (Ask mode).
  • Enabled: Automatic update is enabled by default, and users can opt out (Inform mode).

Learn more about the admin configuration modes.

The combination of these settings determines whether automatic update runs, which signals are active, and how users are informed.

Parameter properties

Type:String
Default value:Disabled
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

System.String

Outputs

System.Void