Functions/Get-Office365SecurityAndComplianceSettingObjects.ps1
<#
.SYNOPSIS This function returns objects representing the various settings which can be retrieved from Office 365 Security And Compliance. .DESCRIPTION This function returns objects representing the various settings which can be retrieved from Office 365 Security And Compliance. Each object contains a description of the setting, a script block which returns the value of the setting, and the name of the setting which is suitable for a variable name. #> function Get-Office365SecurityAndComplianceSettingObjects { [CmdletBinding(PositionalBinding=$false)] [OutputType([PSCustomObject[]])] param () # Return the setting objects return @( [PSCustomObject]@{ Description = "activity alerts" ScriptBlock = { Get-ActivityAlert } VariableName = "ActivityAlerts" }, [PSCustomObject]@{ Description = "compliance security filters" ScriptBlock = { Get-ComplianceSecurityFilter } VariableName = "ComplianceSecurityFilters" }, [PSCustomObject]@{ Description = "compliance policies" ScriptBlock = { Get-DLPCompliancePolicy } VariableName = "CompliancePolicies" }, [PSCustomObject]@{ Description = "compliance rules" ScriptBlock = { Get-DLPComplianceRule } VariableName = "ComplianceRules" }, [PSCustomObject]@{ Description = "sensitive information types" ScriptBlock = { Get-DLPSensitiveInformationType } VariableName = "SensitiveInformationTypes" }, [PSCustomObject]@{ Description = "sensitive information type rule packages" ScriptBlock = { Get-DLPSensitiveInformationTypeRulePackage } VariableName = "SensitiveInformationTypeRulePackages" }, [PSCustomObject]@{ Description = "case hold rules" ScriptBlock = { Get-CaseHoldRule } VariableName = "CaseHoldRules" }, [PSCustomObject]@{ Description = "eDiscovery case administrators" ScriptBlock = { Get-EDiscoveryCaseAdmin } VariableName = "EDiscoveryCaseAdministrators" }, [PSCustomObject]@{ Description = "compliance tags" ScriptBlock = { Get-ComplianceTag } VariableName = "ComplianceTags" }, [PSCustomObject]@{ Description = "compliance tag storage" ScriptBlock = { Get-ComplianceTagStorage } VariableName = "ComplianceTagStorage" }, [PSCustomObject]@{ Description = "retention compliance policies" ScriptBlock = { Get-RetentionCompliancePolicy } VariableName = "RetentionCompliancePolicy" }, [PSCustomObject]@{ Description = "retention compliance rules" ScriptBlock = { Get-RetentionComplianceRule } VariableName = "RetentionComplianceRules" }, [PSCustomObject]@{ Description = "management roles" ScriptBlock = { Get-ManagementRole } VariableName = "ManagementRoles" }, [PSCustomObject]@{ Description = "role groups" ScriptBlock = { Get-RoleGroup } VariableName = "RoleGroups" }, [PSCustomObject]@{ Description = "role group members" ScriptBlock = { foreach ($roleGroup in (Get-RoleGroup)) { $roleGroupMembers = Get-RoleGroupMember -Identity $roleGroup.Name foreach ($member in $roleGroupMembers) { $member | Add-Member -NotePropertyName "RoleGroup" -NotePropertyValue $roleGroup.Name -Force $member } } } VariableName = "RoleGroupMembers" }, [PSCustomObject]@{ Description = "supervisory review policies" ScriptBlock = { Get-SupervisoryReviewPolicyV2 } VariableName = "SupervisoryReviewPolicies" }, [PSCustomObject]@{ Description = "supervisory review rules" ScriptBlock = { Get-SupervisoryReviewRule } VariableName = "SupervisoryReviewRules" } ) } |