|
| 1 | +--- |
| 2 | +external help file: Microsoft.Exchange.TransportMailflow-Help.xml |
| 3 | +online version: https://learn.microsoft.com/powershell/module/exchange/invoke-compliancesecurityfilteraction |
| 4 | +applicable: Security & Compliance |
| 5 | +title: Invoke-ComplianceSecurityFilterAction |
| 6 | +schema: 2.0.0 |
| 7 | +author: chrisda |
| 8 | +ms.author: chrisda |
| 9 | +ms.reviewer: |
| 10 | +--- |
| 11 | + |
| 12 | +# Invoke-ComplianceSecurityFilterAction |
| 13 | + |
| 14 | +## SYNOPSIS |
| 15 | +This cmdlet is available only in Security & Compliance PowerShell. For more information, see [Security & Compliance PowerShell](https://learn.microsoft.com/powershell/exchange/scc-powershell). |
| 16 | + |
| 17 | +Use the Invoke-ComplianceSecurityFilterAction cmdlet to view and set compliance boundaries for Microsoft OneDrive sites in cloud-based organizations. |
| 18 | + |
| 19 | +For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://learn.microsoft.com/powershell/exchange/exchange-cmdlet-syntax). |
| 20 | + |
| 21 | +## SYNTAX |
| 22 | + |
| 23 | +``` |
| 24 | +Invoke-ComplianceSecurityFilterAction [-Action] <String> [-PropertyName] <String> [[-PropertyValue] <String>] [-SiteUrl] <String> |
| 25 | + [-Confirm] |
| 26 | + [-WhatIf] |
| 27 | + [<CommonParameters>] |
| 28 | +``` |
| 29 | + |
| 30 | +## DESCRIPTION |
| 31 | +This cmdlet is useful in scenarios where the OneDrive site has fallen out of the compliance boundary due to a departed user and a corresponding inactive mailbox. |
| 32 | + |
| 33 | +To use this cmdlet in Security & Compliance PowerShell, you need to be a member of the Compliance Administrator role group. For more information, see [Permissions in the Microsoft Purview compliance portal](https://learn.microsoft.com/purview/microsoft-365-compliance-center-permissions). |
| 34 | + |
| 35 | +## EXAMPLES |
| 36 | + |
| 37 | +### Example 1 |
| 38 | +```powershell |
| 39 | +PS C:\> Invoke-ComplianceSecurityFilterAction -Action GetStatus -PropertyName CustomAttribute1 -SiteUrl https://contoso-my.sharepoint.com/personal/lila_contoso_onmicrosoft_com/_layouts/15/onedrive.aspx |
| 40 | +
|
| 41 | +SiteUrlOrEmailAddress : https://contoso-my.sharepoint.com/personal/lila_contoso_onmicrosoft_com/_layouts/15/onedrive.aspx |
| 42 | +BoundaryType : UserMailbox |
| 43 | +BoundaryInstruction : Set via Set-Mailbox |
| 44 | +BoundaryObjectId : SPO_f82ace6e-817e-4752-8917-67164dabde98@SPO_775ea11f-a2af-7821-b04c-9848e903ce47 |
| 45 | +BoundaryStatus : Success |
| 46 | +BoundaryProperty : CustomAttribute1 |
| 47 | +BoundaryPropertyValue : |
| 48 | +``` |
| 49 | + |
| 50 | +This example returns the status of a OneDrive site to indicate it's associated to a UserMailbox and the CustomAttribute1 property isn't currently set. |
| 51 | + |
| 52 | +### Example 2 |
| 53 | +```powershell |
| 54 | +PS C:\> Invoke-ComplianceSecurityFi1terAction Action GetStatus -PropertyName "CustomAttribute3" -EmailAddress "nina@contoso.onmicrosoft.com" |
| 55 | +
|
| 56 | +SiteUrlOrEmailAddress : nina@contoso.onmicrosoft.com |
| 57 | +BoundaryType : UserMailbox |
| 58 | +BoundaryInstruction : Set via Set-Mailbox |
| 59 | +BoundaryObjectId : nina@contoso.onmicrosoft.com |
| 60 | +BoundaryStatus : Success |
| 61 | +BoundaryProperty : CustomAttribute3 |
| 62 | +BoundaryPropertyVa1ue : |
| 63 | +``` |
| 64 | + |
| 65 | +This example returns the status of a mailbox to indicate the mailbox is inactive, and the CustomAttribute3 property isn't currently set. |
| 66 | + |
| 67 | +### Example 3 |
| 68 | +```powershell |
| 69 | +PS C:\> Invoke-ComplianceSecurityFi1terAction -Action GetStatus -PropertyName "CustomAttribute3" -EmailAddress "zhexuan@contoso.onmicrosoft.com" |
| 70 | +
|
| 71 | +SiteUrlOrEmailAddress : zhexuan@contoso.onmicrosoft.com |
| 72 | +BoundaryType : InactiveMailbox |
| 73 | +BoundaryInstruction : Set via Invoke-ComplianceSecurityFiIterAction -Set |
| 74 | +BoundaryObjectId : zhexuan@contoso.onmicrosoft.com |
| 75 | +BoundaryStatus : Success |
| 76 | +BoundaryProperty : CustomAttribute3 |
| 77 | +BoundaryPropertyVa1ue : test33 |
| 78 | +``` |
| 79 | + |
| 80 | +This example returns the status of a mailbox to indicate the mailbox is inactive, and the CustomAttribute3 property is currently set to test33. |
| 81 | + |
| 82 | +### Example 4 |
| 83 | +```powershell |
| 84 | +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 |
| 85 | +``` |
| 86 | + |
| 87 | +This example sets the boundary of the specified OneDrive site for a user who left the company. |
| 88 | + |
| 89 | +### Example 5 |
| 90 | +```powershell |
| 91 | +PS C:\> Invoke-ComplianceSecurityFiIterAction -Action Set -PropertyName "CustomAttribute3" -PropertyValue "ProjectX" -EmailAddress "zhexuan@contoso.onmicrosoft.com" |
| 92 | +
|
| 93 | +Set action succeeded, please use GetStatus to check the result. |
| 94 | +
|
| 95 | +PS C:\> Invoke-ComplianceSecurityFiIterAction -Action GetStatus -PropertyName "CustomAttribute3" -EmailAddress "zhexuan@contoso.onmicrosoft.com" |
| 96 | +
|
| 97 | +SiteUrlOrEmailAddress : zhexuan@contoso.onmicrosoft.com |
| 98 | +BoundaryType : InactiveMailbox |
| 99 | +BoundaryInstruction : Set via Invoke-ComplianceSecurityFiIterAction -Set |
| 100 | +BoundaryObjectId : zhexuan@contoso.onmicrosoft.com |
| 101 | +BoundaryStatus : Success |
| 102 | +BoundaryProperty : CustomAttribute3 |
| 103 | +BoundaryPropertyVa1ue : ProjectX |
| 104 | +``` |
| 105 | + |
| 106 | +This example sets the boundary of the specified OneDrive site to the specified CustomAttribute3 property value, and runs another command to review the result. |
| 107 | + |
| 108 | +## PARAMETERS |
| 109 | + |
| 110 | +### -Action |
| 111 | +The Action parameter specifies the action for the command. Valid values are: |
| 112 | + |
| 113 | +- GetStatus |
| 114 | +- Set |
| 115 | + |
| 116 | +```yaml |
| 117 | +Type: String |
| 118 | +Parameter Sets: (All) |
| 119 | +Aliases: |
| 120 | +Applicable: Security & Compliance |
| 121 | + |
| 122 | +Required: True |
| 123 | +Position: 1 |
| 124 | +Default value: None |
| 125 | +Accept pipeline input: False |
| 126 | +Accept wildcard characters: False |
| 127 | +``` |
| 128 | +
|
| 129 | +### -PropertyName |
| 130 | +The PropertyName parameter specifies the name of the property of the compliance boundary for the OneDrive site that you want to view or modify. Valid values are: |
| 131 | +
|
| 132 | +- CustomAttribute1 to CustomAttribute15 |
| 133 | +
|
| 134 | +Use the PropertyValue parameter to set the compliance boundary. |
| 135 | +
|
| 136 | +```yaml |
| 137 | +Type: String |
| 138 | +Parameter Sets: (All) |
| 139 | +Aliases: |
| 140 | +Applicable: Security & Compliance |
| 141 | + |
| 142 | +Required: True |
| 143 | +Position: 2 |
| 144 | +Default value: None |
| 145 | +Accept pipeline input: False |
| 146 | +Accept wildcard characters: False |
| 147 | +``` |
| 148 | +
|
| 149 | +### -PropertyValue |
| 150 | +The PropertyValue parameter specifies the value of the PropertyName value when you use the Action parameter value Set to set the compliance boundary of a OneDrive site. If the value contains spaces, enclose the value in quotation marks ("). |
| 151 | +
|
| 152 | +```yaml |
| 153 | +Type: String |
| 154 | +Parameter Sets: (All) |
| 155 | +Aliases: |
| 156 | +Applicable: Security & Compliance |
| 157 | + |
| 158 | +Required: False |
| 159 | +Position: 3 |
| 160 | +Default value: None |
| 161 | +Accept pipeline input: False |
| 162 | +Accept wildcard characters: False |
| 163 | +``` |
| 164 | +
|
| 165 | +### -SiteUrl |
| 166 | +The SiteUrl parameter specifies the OneDrive site that you want to view or modify. This parameter uses the syntax `https://<domain>-my.sharepoint.com/personal/<user>_<domain>_onmicrosoft_com/_layouts/15/onedrive.aspx`. For example: `https://contoso-my.sharepoint.com/personal/lila_contoso_onmicrosoft_com/_layouts/15/onedrive.aspx`. |
| 167 | + |
| 168 | +```yaml |
| 169 | +Type: String |
| 170 | +Parameter Sets: (All) |
| 171 | +Aliases: |
| 172 | +Applicable: Security & Compliance |
| 173 | +
|
| 174 | +Required: True |
| 175 | +Position: 4 |
| 176 | +Default value: None |
| 177 | +Accept pipeline input: False |
| 178 | +Accept wildcard characters: False |
| 179 | +``` |
| 180 | + |
| 181 | +### -Confirm |
| 182 | +The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding. |
| 183 | + |
| 184 | +- Destructive cmdlets (for example, Remove-\* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: `-Confirm:$false`. |
| 185 | +- Most other cmdlets (for example, New-\* and Set-\* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding. |
| 186 | + |
| 187 | +```yaml |
| 188 | +Type: SwitchParameter |
| 189 | +Parameter Sets: (All) |
| 190 | +Aliases: cf |
| 191 | +Applicable: Security & Compliance |
| 192 | +
|
| 193 | +Required: False |
| 194 | +Position: Named |
| 195 | +Default value: None |
| 196 | +Accept pipeline input: False |
| 197 | +Accept wildcard characters: False |
| 198 | +``` |
| 199 | + |
| 200 | +### -WhatIf |
| 201 | +The WhatIf switch doesn't work in Security & Compliance PowerShell. |
| 202 | + |
| 203 | +```yaml |
| 204 | +Type: SwitchParameter |
| 205 | +Parameter Sets: (All) |
| 206 | +Aliases: wi |
| 207 | +Applicable: Security & Compliance |
| 208 | +
|
| 209 | +Required: False |
| 210 | +Position: Named |
| 211 | +Default value: None |
| 212 | +Accept pipeline input: False |
| 213 | +Accept wildcard characters: False |
| 214 | +``` |
| 215 | + |
| 216 | +### CommonParameters |
| 217 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/p/?LinkID=113216). |
| 218 | + |
| 219 | +## INPUTS |
| 220 | + |
| 221 | +## OUTPUTS |
| 222 | + |
| 223 | +## NOTES |
| 224 | + |
| 225 | +## RELATED LINKS |
0 commit comments