Remove-CsMobilityPolicy

 

上次修改主題的時間:2017-05-17

重要重要事項:
This only applies to Skype for Business Online and not to Skype for Business Server or Lync on-premises deployments.
重要重要事項:
Please note that if your organization utilizes custom policies, then the UI will no longer correctly reflect the policy values. Once they are implemented they must continue to be managed via PowerShell.

Removes an existing mobility policy. Mobility policies determine whether or not a user can use Call via Work, a feature that enables users to make and receive phone calls on their mobile phone by using their work phone number instead of their mobile phone number. Mobility policies can also be used to require Wi-Fi connections when making or receiving calls.

Remove-CsMobilityPolicy -Identity <XdsIdentity> ] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

The command shown in Example 1 removes the mobility policy configured for Redmond. When the policy is removed, users previously managed by the Redmond policy will now be managed by the global policy.

Remove-CsMobilityPolicy -Identity RedmondPolicy

In Example 2, all the mobility policies configured at the per-user scope are removed. To do this, the command first uses the Get-CsMobilityPolicy cmdlet and the Filter parameter to retrieve all the policies that have an Identity that begins with the string value "Tag:"; by definition, any policy meeting that criterion will be a per-user policy. That collection of per-user policies is then piped to the Remove-CsMobilityPolicy cmdlet, which deletes each policy in the collection.

Get-CsMobilityPolicy -Filter "tag:*" | Remove-CsMobilityPolicy

Example 3 demonstrates a way to delete all the mobility policies where Call via Work has been enabled. To do this, the command first uses the Get-CsMobilityPolicy cmdlet to retrieve a collection of all the mobility policies currently in use in the organization. That collection is then piped to the where-Object cmdlet, which picks out only those policies where the EnableOutsideVoice property is set to False. Any policies where EnableOutsideVoice is False are then piped to, and removed by, the Remove-CsMobilityPolicy cmdlet.

Get-CsMobilityPolicy | Where-Object {$_.EnableOutsideVoice -eq $False} | Remove-CsMobilityPolicy

商務用 Skype app is a client application that enables users to run 商務用 Skype on their mobile devices. Call via Work provides a way for users to make calls on their mobile phone and yet have it appear as though the call originated from their work phone number instead of their mobile phone number. Users who have been enabled for Call via Work can achieve this either by dialing directly from their mobile phone or by using the dial-out conferencing option. With dial-out conferencing, a user effectively asks the to make a call for them. 商務用 Skype Online will set up the call, and then call the user back on their mobile phone. After the user has answered, 商務用 Skype Online will then dial the party being called. Both of these capabilities can be managed by using mobility policies.

With商務用 Skype Online, mobile devices can make or receive phone calls by using either the standard cellular phone network. or by using Wi-Fi connections. Mobility policies can be used to require Wi-Fi connections and to prevent calls over the cellular network.

If you do create custom policies at the per-user scope you can later delete those policies by using the Remove-CsMobilityPolicy cmdlet. If you delete a per-user policy, then any users assigned that policy will be managed by the appropriate site policy (if one exists) or by the global policy. If you remove a site policy, users governed by that policy will then be managed by the global policy.

Note that you can also run the Remove-CsMobilityPolicy cmdlet against the global policy. If you do that, however, the global policy will not actually be deleted; instead, the properties in that policy will be reset to their default values. In this case, that means enabling Call via Work.

 

Parameter Required Type Description

Identity

Required

Microsoft.Rtc.Management.Xds.XdsIdentity

Unique identifier for the client policy to be removed. To "remove" the global policy, use the following syntax:

-Identity global

Note, however, that the global policy cannot actually be removed. Instead, all the properties in that policy will be reset to their default values.

To remove a per-user policy, use syntax similar to this:

-Identity "SalesDepartmentPolicy"

You cannot use wildcards when specifying a policy Identity.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command.

Force

Optional

System.Management.Automation.SwitchParameter

If this parameter is present, the policy will be removed even if it is currently assigned to at least one user. If this parameter is not present, then the Remove-CsMobilityPolicy cmdlet will not automatically remove a per-user policy that is assigned to at least one user. Instead, a confirmation prompt will appear asking if you are sure that you want to remove the policy. You must answer yes (by pressing the Y key) before the command will continue and the policy is removed.

This parameter applies only to per-user policies.

WhatIf

Optional

System.Management.Automation.SwitchParameter

Describes what would happen if you executed the command without actually executing the command.

Microsoft.Rtc.Management.WriteableConfig.Policy.Mobility.Mobility. The Remove-CsMobilityPolicy cmdlet accepts pipelined instances of the Mobility object.

None. Instead, the Remove-CsMobilityPolicy cmdlet deletes instances of the Microsoft.Rtc.Management.WriteableConfig.Policy.Mobility.Mobility object.

 
顯示: