Edit

Share via


New-CsTeamsWorkLocationDetectionPolicy

This cmdlet is used to create a new instance of the TeamsWorkLocationDetectionPolicy.

Syntax

Default (Default)

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

Description

Creates a new instance of the TeamsWorkLocationDetectionPolicy. This policy can be used to tailor the work location detection experience.

  • The parameter EnableWorkLocationDetection allows your organization to collect the work location of users when they connect, interact, or are detected near your organization's networks and devices. It also captures the geographic location information users share from personal and mobile devices. This gives users the ability to consent to the use of this location data to set their current work location. Microsoft collects this information to provide users with a consistent location-based experience and to improve the hybrid work experience in Microsoft 365 according to the Microsoft Privacy Statement.

  • The parameter UserSettingsDefault specifies the default user settings behavior for work location detection. Possible values are Disabled (default) and Enabled.

The end user experience utilizing this policy has rolled out to the general public. You can see updates at Microsoft 365 Roadmap | Microsoft 365 and to learn more on how to enable the end user experience, please see Setting up Bookable Desks in Microsoft Teams - Microsoft Teams | Microsoft Learn..

Examples

Example 1

PS C:\> New-CsTeamsWorkLocationDetectionPolicy -Identity wld-policy -EnableWorkLocationDetection $true
Identity       EnableWorkLocationDetection UserSettingsDefault
--------       --------------------------- -------------------
Tag:wld-policy                        True            Disabled

Creates a new policy instance with the identity wld-policy. EnableWorkLocationDetection is set to the value specified in the command, and UserSettingsDefault defaults to Disabled.

Example 2

PS C:\> New-CsTeamsWorkLocationDetectionPolicy -Identity wld-policy -UserSettingsDefault Enabled
Identity       EnableWorkLocationDetection UserSettingsDefault
--------       --------------------------- -------------------
Tag:wld-policy                       False             Enabled

Creates a new policy instance with the identity wld-policy. EnableWorkLocationDetection defaults to False and UserSettingsDefault is set 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 setting allows your organization to collect the work location of users when they connect, interact, or are detected near your organization's networks and devices. It also captures the geographic location information users share from personal and mobile devices. This gives users the ability to consent to the use of this location data to set their current work location.Microsoft collects this information to provide users with a consistent location-based experience and to improve the hybrid work experience in Microsoft 365 according to 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 created.

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

Specifies the default user settings behavior for work location detection. Possible values are:

  • Enabled: Enables the default user settings for work location detection.
  • Disabled: Disables the default user settings for work location detection.

The default value is Disabled.

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

TeamsWorkLocationDetectionPolicy.Cmdlets.TeamsWorkLocationDetectionPolicy