Invoke-ComplianceSecurityFilterAction
此 cmdlet 仅在安全与合规中心 PowerShell 内可用。 有关更多信息,请参见 安全与合规中心 PowerShell。
使用 Invoke-ComplianceSecurityFilterAction cmdlet 查看和设置基于云的组织中的 Microsoft OneDrive 站点的符合性边界。
有关以下语法部分的参数设置的详细信息,请参阅 Exchange cmdlet 语法。
语法
Default (默认值)
Invoke-ComplianceSecurityFilterAction
[-Action] <String>
[[-EmailAddress] <String>]
[-PropertyName] <String>
[[-PropertyValue] <String>]
[-SiteUrl] <String>
[-Confirm]
[-WhatIf]
[<CommonParameters>]
说明
此 cmdlet 在 OneDrive 网站因用户离职和相应的非活动邮箱而退出合规性边界的情况中非常有用。
若要在安全性 & 合规性 PowerShell 中使用此 cmdlet,需要是合规性管理员角色组的成员。 有关详细信息,请参阅 Microsoft Purview 合规门户中的权限。
示例
示例 1
PS C:\> Invoke-ComplianceSecurityFilterAction -Action GetStatus -PropertyName CustomAttribute1 -SiteUrl https://contoso-my.sharepoint.com/personal/lila_contoso_onmicrosoft_com/_layouts/15/onedrive.aspx
SiteUrlOrEmailAddress : https://contoso-my.sharepoint.com/personal/lila_contoso_onmicrosoft_com/_layouts/15/onedrive.aspx
BoundaryType : UserMailbox
BoundaryInstruction : Set via Set-Mailbox
BoundaryObjectId : SPO_f82ace6e-817e-4752-8917-67164dabde98@SPO_775ea11f-a2af-7821-b04c-9848e903ce47
BoundaryStatus : Success
BoundaryProperty : CustomAttribute1
BoundaryPropertyValue :
此示例返回 OneDrive 网站的状态,以指示它已关联到用户邮箱,并且当前未设置 CustomAttribute1 属性。
示例 2
PS C:\> Invoke-ComplianceSecurityFi1terAction -Action GetStatus -PropertyName "CustomAttribute3" -EmailAddress "nina@contoso.onmicrosoft.com"
SiteUrlOrEmailAddress : nina@contoso.onmicrosoft.com
BoundaryType : UserMailbox
BoundaryInstruction : Set via Set-Mailbox
BoundaryObjectId : nina@contoso.onmicrosoft.com
BoundaryStatus : Success
BoundaryProperty : CustomAttribute3
BoundaryPropertyVa1ue :
此示例返回邮箱的状态以指示邮箱处于非活动状态,并且当前未设置 CustomAttribute3 属性。
示例 3
PS C:\> Invoke-ComplianceSecurityFi1terAction -Action GetStatus -PropertyName "CustomAttribute3" -EmailAddress "zhexuan@contoso.onmicrosoft.com"
SiteUrlOrEmailAddress : zhexuan@contoso.onmicrosoft.com
BoundaryType : InactiveMailbox
BoundaryInstruction : Set via Invoke-ComplianceSecurityFiIterAction -Set
BoundaryObjectId : zhexuan@contoso.onmicrosoft.com
BoundaryStatus : Success
BoundaryProperty : CustomAttribute3
BoundaryPropertyVa1ue : test33
此示例返回邮箱的状态以指示邮箱处于非活动状态,并且 CustomAttribute3 属性当前设置为 test33。
示例 4
Invoke-ComplianceSecurityFilterAction -Action Set -PropertyName CustomAttribute1 -PropertyValue "Research and Development" -SiteUrl https://contoso-my.sharepoint.com/personal/lila_contoso_onmicrosoft_com/_layouts/15/onedrive.aspx
本示例为离开公司的用户设置指定 OneDrive 站点的边界。
示例 5
PS C:\> Invoke-ComplianceSecurityFiIterAction -Action Set -PropertyName "CustomAttribute3" -PropertyValue "ProjectX" -EmailAddress "zhexuan@contoso.onmicrosoft.com"
Set action succeeded, please use GetStatus to check the result.
PS C:\> Invoke-ComplianceSecurityFiIterAction -Action GetStatus -PropertyName "CustomAttribute3" -EmailAddress "zhexuan@contoso.onmicrosoft.com"
SiteUrlOrEmailAddress : zhexuan@contoso.onmicrosoft.com
BoundaryType : InactiveMailbox
BoundaryInstruction : Set via Invoke-ComplianceSecurityFiIterAction -Set
BoundaryObjectId : zhexuan@contoso.onmicrosoft.com
BoundaryStatus : Success
BoundaryProperty : CustomAttribute3
BoundaryPropertyVa1ue : ProjectX
本示例将指定 OneDrive 网站的边界设置为指定的 CustomAttribute3 属性值,并运行另一个命令来查看结果。
参数
-Action
适用:安全 & 合规性
Action 参数指定命令的作。 有效值包含:
- GetStatus
- Set
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | 1 |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Confirm
适用:安全 & 合规性
Confirm 开关指定是否显示确认提示。 此开关对 cmdlet 造成的影响取决于在你继续操作之前 cmdlet 是否需要确认。
- 破坏性 cmdlet(例如 Remove-* cmdlets)内置有暂停,可强制要求先确认命令,然后再继续操作。 对于这些 cmdlet,您可以使用此确切语法跳过确认提示:
-Confirm:$false。 - 其他大多数 cmdlet(例如 New-* 和 Set-* cmdlet)都没有内置暂停。 对于这些 cmdlet,指定不含值的 Confirm 开关会引入暂停,从而强制要求你先确认命令,然后再继续操作。
参数属性
| 类型: | SwitchParameter |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | cf |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-EmailAddress
适用:安全 & 合规性
EmailAddress 参数指定受影响的用户邮箱。 可以使用以下值来唯一标识邮箱:
- 名称
- 电子邮件地址
- 别名
- ExchangeGUID
如果值包含空格,则使用引号括住该值。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | 2 |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-PropertyName
适用:安全 & 合规性
PropertyName 参数指定要查看或修改的 OneDrive 网站的符合性边界属性的名称。 有效值包含:
- CustomAttribute1 到 CustomAttribute15
使用 PropertyValue 参数设置符合性边界。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | 3 |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-PropertyValue
适用:安全 & 合规性
使用 Action 参数值 Set 设置 OneDrive 网站的符合性边界时,PropertyValue 参数指定 PropertyName 值的值。 如果值中有空格,请使用双引号 (") 将此值括起来。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | 4 |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-SiteUrl
适用:安全 & 合规性
SiteUrl 参数指定要查看或修改的 OneDrive 网站。 此参数使用语法 https://<domain>-my.sharepoint.com/personal/<user>_<domain>_onmicrosoft_com/_layouts/15/onedrive.aspx。 例如:https://contoso-my.sharepoint.com/personal/lila_contoso_onmicrosoft_com/_layouts/15/onedrive.aspx。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | 5 |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-WhatIf
适用:安全 & 合规性
WhatIf 开关在安全与合规 PowerShell 中不起作用。
参数属性
| 类型: | SwitchParameter |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | 无线 |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。