Skip to content

Commit cfc7054

Browse files
authored
Merge pull request MicrosoftDocs#7149 from MicrosoftDocs/DataExtract-chrisda
DataExtract-chrisda to Master
2 parents d391764 + ab93d41 commit cfc7054

File tree

4 files changed

+280
-0
lines changed

4 files changed

+280
-0
lines changed
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
external help file: Microsoft.Exchange.RemoteConnections-Help.xml
3+
online version: https://docs.microsoft.com/powershell/module/exchange/test-dataclassification
4+
applicable: Exchange Server 2016, Exchange Server 2019, Exchange Online, Security & Compliance Center
5+
title: Test-DataClassification
6+
schema: 2.0.0
7+
author: chrisda
8+
ms.author: chrisda
9+
ms.reviewer:
10+
---
11+
12+
# Test-DataClassification
13+
14+
## SYNOPSIS
15+
This cmdlet is available in on-premises Exchange and in the cloud-based service. Some parameters and settings may be exclusive to one environment or the other.
16+
17+
Use the Test-DataClassification cmdlet to find the confidence and count of a sensitive information type that's found in a specified text string.
18+
19+
For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://docs.microsoft.com/powershell/exchange/exchange-cmdlet-syntax).
20+
21+
## SYNTAX
22+
23+
```
24+
Test-DataClassification
25+
[-ClassificationNames <String[]>]
26+
[-DomainController <Fqdn>]
27+
[-TestTextExtractionResults <TestTextExtractionResult[]>]
28+
[-TextToClassify <String>]
29+
[<CommonParameters>]
30+
```
31+
32+
## DESCRIPTION
33+
This cmdlet lets you know the classification results that are returned by the Microsoft classification engine in specific text. The classification results include the sensitive type, its count, and confidence.
34+
35+
You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see [Find the permissions required to run any Exchange cmdlet](https://docs.microsoft.com/powershell/exchange/find-exchange-cmdlet-permissions).
36+
37+
## EXAMPLES
38+
39+
### Example 1
40+
```powershell
41+
$r = Test-DataClassification -TextToClassify "Credit card information Visa: 4485 3647 3952 7352. Patient Identifier or SSN: 452-12-1232"
42+
$r.ClassificationResults
43+
```
44+
45+
This example lists all sensitive info types, their count, and confidence in the specified text string.
46+
47+
## PARAMETERS
48+
49+
### -ClassificationNames
50+
The ClassificationNames parameter specifies the sensitive information type that you want to find in the text specified by the TextToClassify parameter. Valid values are:
51+
52+
- Name
53+
- Id (GUID value)
54+
55+
You can specify multiple values separated by commas.
56+
57+
```yaml
58+
Type: String[]
59+
Parameter Sets: (All)
60+
Aliases:
61+
Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Online, Security & Compliance Center
62+
63+
Required: False
64+
Position: Named
65+
Default value: None
66+
Accept pipeline input: False
67+
Accept wildcard characters: False
68+
```
69+
70+
### -DomainController
71+
This parameter is available only in on-premises Exchange.
72+
73+
The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name (FQDN). For example, dc01.contoso.com.
74+
75+
```yaml
76+
Type: Fqdn
77+
Parameter Sets: (All)
78+
Aliases:
79+
Applicable: Exchange Server 2016, Exchange Server 2019, Security & Compliance Center
80+
81+
Required: False
82+
Position: Named
83+
Default value: None
84+
Accept pipeline input: False
85+
Accept wildcard characters: False
86+
```
87+
88+
### -TestTextExtractionResults
89+
The TestTextExtractionResults parameter specifies the extracted text from the Test-TextExtraction cmdlet as the input text stream.
90+
91+
```yaml
92+
Type: TestTextExtractionResult[]
93+
Parameter Sets: (All)
94+
Aliases:
95+
Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Online, Security & Compliance Center
96+
97+
Required: False
98+
Position: Named
99+
Default value: None
100+
Accept pipeline input: True (ByValue)
101+
Accept wildcard characters: False
102+
```
103+
104+
### -TextToClassify
105+
The TextToClassify parameter specifies the text string for which classification results need to be shown.
106+
107+
```yaml
108+
Type: String
109+
Parameter Sets: (All)
110+
Aliases:
111+
Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Online, Security & Compliance Center
112+
113+
Required: False
114+
Position: Named
115+
Default value: None
116+
Accept pipeline input: False
117+
Accept wildcard characters: False
118+
```
119+
120+
### CommonParameters
121+
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).
122+
123+
## INPUTS
124+
125+
###
126+
127+
## OUTPUTS
128+
129+
###
130+
131+
## NOTES
132+
133+
## RELATED LINKS
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
---
2+
external help file: Microsoft.Exchange.RemoteConnections-Help.xml
3+
online version: https://docs.microsoft.com/powershell/module/exchange/test-textextraction
4+
applicable: Exchange Server 2016, Exchange Server 2019, Exchange Online
5+
title: Test-TextExtraction
6+
schema: 2.0.0
7+
author: chrisda
8+
ms.author: chrisda
9+
ms.reviewer:
10+
---
11+
12+
13+
# Test-TextExtraction
14+
15+
## SYNOPSIS
16+
This cmdlet is available in on-premises Exchange and in the cloud-based service. Some parameters and settings may be exclusive to one environment or the other.
17+
18+
Use the Test-TextExtraction cmdlet to find the text that is extracted from a specified email message in Exchange flow.
19+
20+
For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://docs.microsoft.com/powershell/exchange/exchange-cmdlet-syntax).
21+
22+
## SYNTAX
23+
24+
```
25+
Test-TextExtraction [-FileData] <Byte[]>
26+
[-Confirm]
27+
[-DomainController <Fqdn>]
28+
[-WhatIf]
29+
[<CommonParameters>]
30+
```
31+
32+
## DESCRIPTION
33+
This cmdlet returns the text that is found in a file in Exchange. The Microsoft classification engine uses this text to classify content and determine which sensitive information types are found in this file/message.
34+
35+
You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see [Find the permissions required to run any Exchange cmdlet](https://docs.microsoft.com/powershell/exchange/find-exchange-cmdlet-permissions).
36+
37+
## EXAMPLES
38+
39+
### Example 1
40+
```powershell
41+
$content = Test-TextExtraction -FileData (Get-Content -Path '.\finalcial data.msg' -Encoding byte -ReadCount 0)
42+
$content.ExtractedResults
43+
```
44+
45+
This example returns the text that's extracted from the email "financial data.msg"
46+
47+
### Example 2
48+
```powershell
49+
$content = Test-TextExtraction -FileData (Get-Content -Path '.\finalcial data.msg' -Encoding byte -ReadCount 0)
50+
Test-DataClassification -TestTextExtractionResults $tr.ExtractedResults
51+
```
52+
53+
This example extracts the text from the email "financial data.msg" and returns the sensitive information types, their confidence, and count.
54+
55+
## PARAMETERS
56+
57+
### -FileData
58+
The FileData parameter specifies the name and path of the file from which text should be extracted.
59+
60+
A valid value for this parameter requires you to read the file to a byte-encoded object using the Get-Content cmdlet. For example, `(Get-Content -Encoding Byte -Path "C:\My Documents\<filename>" -ReadCount 0)`.
61+
62+
```yaml
63+
Type: Byte[]
64+
Parameter Sets: (All)
65+
Aliases:
66+
Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Online
67+
68+
Required: True
69+
Position: 0
70+
Default value: None
71+
Accept pipeline input: False
72+
Accept wildcard characters: False
73+
```
74+
75+
### -Confirm
76+
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.
77+
78+
- 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`.
79+
- 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.
80+
81+
```yaml
82+
Type: SwitchParameter
83+
Parameter Sets: (All)
84+
Aliases: cf
85+
Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Online
86+
87+
Required: False
88+
Position: Named
89+
Default value: None
90+
Accept pipeline input: False
91+
Accept wildcard characters: False
92+
```
93+
94+
### -DomainController
95+
This parameter is available only in on-premises Exchange.
96+
97+
The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name (FQDN). For example, dc01.contoso.com.
98+
99+
```yaml
100+
Type: Fqdn
101+
Parameter Sets: (All)
102+
Aliases:
103+
Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Online
104+
105+
Required: False
106+
Position: Named
107+
Default value: None
108+
Accept pipeline input: False
109+
Accept wildcard characters: False
110+
```
111+
112+
### -WhatIf
113+
The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.
114+
115+
```yaml
116+
Type: SwitchParameter
117+
Parameter Sets: (All)
118+
Aliases: wi
119+
Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Online
120+
121+
Required: False
122+
Position: Named
123+
Default value: None
124+
Accept pipeline input: False
125+
Accept wildcard characters: False
126+
```
127+
128+
### CommonParameters
129+
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).
130+
131+
## INPUTS
132+
133+
###
134+
135+
## OUTPUTS
136+
137+
###
138+
139+
## NOTES
140+
141+
## RELATED LINKS

exchange/exchange-ps/exchange/exchange.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,6 +1902,10 @@ Exchange PowerShell is built on Windows PowerShell technology and provides a pow
19021902

19031903
### [Set-PolicyTipConfig](Set-PolicyTipConfig.md)
19041904

1905+
### [Test-DataClassification](Test-DataClassification.md)
1906+
1907+
### [Test-TextExtraction](Test-TextExtraction.md)
1908+
19051909
## policy-and-compliance-ediscovery Cmdlets
19061910
### [Add-ComplianceCaseMember](Add-ComplianceCaseMember.md)
19071911

exchange/mapping/serviceMapping.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,8 @@
936936
"Set-DlpSensitiveInformationType": "policy-and-compliance-dlp",
937937
"Set-DlpSensitiveInformationTypeRulePackage": "policy-and-compliance-dlp",
938938
"Set-PolicyTipConfig": "policy-and-compliance-dlp",
939+
"Test-DataClassification": "policy-and-compliance-dlp",
940+
"Test-TextExtraction": "policy-and-compliance-dlp",
939941
"Add-ComplianceCaseMember": "policy-and-compliance-ediscovery",
940942
"Add-eDiscoveryCaseAdmin": "policy-and-compliance-ediscovery",
941943
"Get-CaseHoldPolicy": "policy-and-compliance-ediscovery",

0 commit comments

Comments
 (0)