< Back
Get-LaCompliancePolicyLocation
Post
NAME Get-LaCompliancePolicyLocation
SYNOPSIS
Reports on all Label Policies and Office 365 Retention Policies located in the Security and Compliance Center
SYNTAX
Get-LaCompliancePolicyLocation [-All] [-Exchange] [-SharePoint] [-OneDrive] [-Skype] [-Groups] [-WithExceptions]
[-OnlyExceptions] [<CommonParameters>]
DESCRIPTION
Reports on all Label Policies and Office 365 Retention Policies located in the Security and Compliance Center
Label Policies contain labels that are applied by end-users or with Auto-Apply (E5 license required). Note:
Auto-Apply is by keyword or by Sensitive Data Types (Sensitive Data Types is only for OneDrive and SharePoint)
Office 365 Retention Policies are applied by administrators. For Label Policies, this reports which users are
presented with which labels. For Office 365 Retention Policies, this reports on where administrators have chosen
to apply this policy.
The Label or Retention Policies are set to (either include OR exclude) 4 different workflows.
1. Exchange Email 2. SharePoint Sites 3. OneDrive Accounts 4. Office 365 Groups
A Label or Retention Policy can contain either a set of inclusions or exclusions to one thru four of the above
workflows. It is worth noting, a Label or Retention Policy cannot exclude the mailbox of USER01 and include the
mailbox of USER02.
So, when excluding certain mailboxes or sites for example, all other mailboxes or sites are included. In contrast,
When including certain mailbox or sites, all other mailboxes or site are excluded.
This function will display each policy and the included locations or the excluded locations of all 4 workflows.
If the Location column displays, "ALL", then all locations of that workflow are included. For example, all
mailboxes or all sharePoint sites. The location column will otherwise display a specific location, for example, a
specific mailbox or specific SharePoint site.
The ContentLocation column can have one of 8 possibilities (all of which are fairly self-explanatory):
1. Exchange 2. SharePoint 3. OneDrive 4. Groups 5. Exchange_Exception 6. SharePoint_Exception 7.
OneDrive_Exception 8. Groups_Exception
PARAMETERS
-All [<SwitchParameter>]
{{All Locations}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Exchange [<SwitchParameter>]
{{Exchange Mailbox Locations}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-SharePoint [<SwitchParameter>]
{{SharePoint Locations}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-OneDrive [<SwitchParameter>]
{{OneDrive Locations}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Skype [<SwitchParameter>]
{{Skype Locations}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Groups [<SwitchParameter>]
{{Office 365 Modern Groups Locations}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WithExceptions [<SwitchParameter>]
{{Included Location Exceptions}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-OnlyExceptions [<SwitchParameter>]
{{Only Include Locations Exceptions}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
-------------------------- EXAMPLE 1 --------------------------
Get-LaCompliancePolicyLocation -All -WithExceptions | Out-GridView
This will display everything, so this is a good command to start with
-------------------------- EXAMPLE 2 --------------------------
Get-LaCompliancePolicyLocation -Exchange -OnlyExceptions | Out-GridView
-------------------------- EXAMPLE 3 --------------------------
Get-LaCompliancePolicyLocation -SharePoint -WithExceptions | Out-GridView
-------------------------- EXAMPLE 4 --------------------------
Get-LaCompliancePolicyLocation -SharePoint -OnlyExceptions | Export-Csv ./sharepointexceptions.csv
-NoTypeInformation
RELATED LINKS
SYNOPSIS
Reports on all Label Policies and Office 365 Retention Policies located in the Security and Compliance Center
SYNTAX
Get-LaCompliancePolicyLocation [-All] [-Exchange] [-SharePoint] [-OneDrive] [-Skype] [-Groups] [-WithExceptions]
[-OnlyExceptions] [<CommonParameters>]
DESCRIPTION
Reports on all Label Policies and Office 365 Retention Policies located in the Security and Compliance Center
Label Policies contain labels that are applied by end-users or with Auto-Apply (E5 license required). Note:
Auto-Apply is by keyword or by Sensitive Data Types (Sensitive Data Types is only for OneDrive and SharePoint)
Office 365 Retention Policies are applied by administrators. For Label Policies, this reports which users are
presented with which labels. For Office 365 Retention Policies, this reports on where administrators have chosen
to apply this policy.
The Label or Retention Policies are set to (either include OR exclude) 4 different workflows.
1. Exchange Email 2. SharePoint Sites 3. OneDrive Accounts 4. Office 365 Groups
A Label or Retention Policy can contain either a set of inclusions or exclusions to one thru four of the above
workflows. It is worth noting, a Label or Retention Policy cannot exclude the mailbox of USER01 and include the
mailbox of USER02.
So, when excluding certain mailboxes or sites for example, all other mailboxes or sites are included. In contrast,
When including certain mailbox or sites, all other mailboxes or site are excluded.
This function will display each policy and the included locations or the excluded locations of all 4 workflows.
If the Location column displays, "ALL", then all locations of that workflow are included. For example, all
mailboxes or all sharePoint sites. The location column will otherwise display a specific location, for example, a
specific mailbox or specific SharePoint site.
The ContentLocation column can have one of 8 possibilities (all of which are fairly self-explanatory):
1. Exchange 2. SharePoint 3. OneDrive 4. Groups 5. Exchange_Exception 6. SharePoint_Exception 7.
OneDrive_Exception 8. Groups_Exception
PARAMETERS
-All [<SwitchParameter>]
{{All Locations}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Exchange [<SwitchParameter>]
{{Exchange Mailbox Locations}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-SharePoint [<SwitchParameter>]
{{SharePoint Locations}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-OneDrive [<SwitchParameter>]
{{OneDrive Locations}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Skype [<SwitchParameter>]
{{Skype Locations}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Groups [<SwitchParameter>]
{{Office 365 Modern Groups Locations}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WithExceptions [<SwitchParameter>]
{{Included Location Exceptions}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-OnlyExceptions [<SwitchParameter>]
{{Only Include Locations Exceptions}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
-------------------------- EXAMPLE 1 --------------------------
Get-LaCompliancePolicyLocation -All -WithExceptions | Out-GridView
This will display everything, so this is a good command to start with
-------------------------- EXAMPLE 2 --------------------------
Get-LaCompliancePolicyLocation -Exchange -OnlyExceptions | Out-GridView
-------------------------- EXAMPLE 3 --------------------------
Get-LaCompliancePolicyLocation -SharePoint -WithExceptions | Out-GridView
-------------------------- EXAMPLE 4 --------------------------
Get-LaCompliancePolicyLocation -SharePoint -OnlyExceptions | Export-Csv ./sharepointexceptions.csv
-NoTypeInformation
RELATED LINKS