You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The **Get-AIPFileStatus** cmdlet returns the Azure Information Protection status of a specified file or all files in a specified path. This status includes whether the file has a label, and if it does, the label name, who applied it, how it was applied, and when. In addition, the status includes whether the file is protected by Rights Management, and it is, what Rights Management template was used to apply this protection.
33
+
The **Get-AIPFileStatus** cmdlet returns the Azure Information Protection status of a specified file or all files in a specified path. This status includes whether the file has a label, and if it does, the label name, who applied it, how it was applied, and when. In addition, the status includes whether the file is protected by Rights Management, and if it is, what Rights Management template was used to apply this protection.
34
34
35
-
Note: This cmdlet is currently installed as part of the preview version of the Azure Information Protection client, and not the RMS Protection tool.
35
+
Note: This cmdlet is currently installed as part of the preview version of the Azure Information Protection client, and is not included in the RMS Protection tool.
36
36
37
37
## EXAMPLES
38
38
39
-
### Example 1: Get label and protection status on a single file.
39
+
### Example 1: Get the label and protection status of a single file
This command provides information about a file that is labeled as Confidential \ Finance Group. This file was labeled manually by John. This file is also encrypted.
57
+
This command provides information about a file that is labeled as Confidential \ Finance Group. This file was labeled manually by John and it is also protected by using the Rights Management template, "Contoso - Confidential Finance".
58
58
59
-
### Example 2: Get label and protection status on all files stored in a specific folder. Export the results to a CSV file.
59
+
### Example 2: Get the label and protection status for all files in a folder and export the results to a CSV file
This example provides the label and protection information about all files under the projects folder (and its entire subfolders) in the finance server. The results are exported to AIP-status.CSV
64
+
This command gets the label and protection information of all files on the Finance server, in the Projects folder and any of its subfolders. The results are exported to the file named AIP-status.csv so that they can be more easily searched and sorted. If a previous report exists in C:\Reports\Report.csv, it will be overwritten.
65
65
66
-
### Example 3: List all “Confidential” files that are stored in a specific folder. Export the results to a CSV file.
66
+
### Example 3: List the files labeled "Confidential" and export the results to a CSV file
This example provides information about all Confidential files stored in the “projects” folder (and its entire subfolders) in the finance server. The results are exported to AIP-status.CSV
71
+
This command gets the label and protection information for just the files that are labeled "Confidential" (regardless of their sub-label) on the Finance server, in the Projects folder and any of its subfolders. The results are exported to the file named AIP-status.csv so that they can be more easily searched and sorted. If a previous report exists in C:\Reports\Report.csv, it will be overwritten.
72
72
73
-
### Example 4: Count how many "Confidential" files are stored in a folder.
73
+
### Example 4: Count of files with a "Confidential" label
This example provides the number of all "Confidential" files stored in the c:\projects folder (and its entire subfolders)
79
+
This command provides the number of files with the "Confidential" label that are in the C:\Projects folder and any of its subfolders. In this example, 5 files are found.
79
80
80
81
## PARAMETERS
81
82
82
83
### -Path
83
-
Specifies a local or network path to one or more locations. (examples: c:\folder\ c:\folder\filename, \\server\folder). Wildcards are not permitted.
84
+
Specifies a local or network path to the files for which you want to get the label and protection information. Examples include C:\Folder\, C:\Folder\Filename, \\Server\Folder). Wildcards are not supported.
Use the **Set-AIPFileLabel** cmdlet to apply or clear a label using Azure Information Protection. Upon label action this cmdlet may apply or remove RMS protection automatically – based on the protection action that is associated with this label on your Azure Information Protection policy.
39
+
The **Set-AIPFileLabel** cmdlet sets or removes an Azure Information Protection label for one or more files. This action can automatically apply or remove protection when labels are configured for Rights Management protection in the Azure Information Protection policy. When the command runs successfully, any existing label or protection is replaced.
40
+
41
+
Note: This cmdlet is currently installed as part of the preview version of the Azure Information Protection client, and is not included in the RMS Protection tool..
40
42
41
43
## EXAMPLES
42
44
43
-
### Example 1: Apply "Confidential" label on all files in a folder (and its entire subfolders)
45
+
### Example 1: Apply the "Confidential" label to all files in a folder and any of its subfolders
This command sets a Confidential label on all files in the Projects folder, and its entire subfolders.
56
-
Files labeled Confidential may become encrypted (in place) if your Azure Information Protection policy applies encryption for files labeled Confidential.
57
-
The labeling and encryption owner is the user that is signed-in to the device running this PowerShell command.
58
-
Note that in this example the analysis.xlsx file was not labeled, as it is currently classified with a higher label, and a justification was not provided in the cmdlet.
57
+
This command sets a label named "Confidential" on all files in the Projects folder and any of its subfolders.
58
+
59
+
If the Confidential label is configured in the Azure Information Protection policy to apply Rights Management protection, the files that were successfully labeled with this command will also be protected. In this case, the Rights Management owner (who has the Rights Management Full Control permission) of these files is the user who ran the PowerShell command.
59
60
61
+
In our example, one file was not labeled (skipped) with the comment that justification is required. This might be the intended outcome to ensure that a file with a higher classification label or protection isn't accidentally overwritten with a lower classification label or has protection removed. To enable this safeguard, the Azure Information Protection policy must be configured to require justification for lowering the classification label, removing a label, or removing protection. When you then run this command without the **JustificationMessage** parameter and the label triggers justification, the file is skipped.
60
62
61
-
### Example 2: Apply "Confidential" label on a single file, providing business justification, in case that the file is classified with a higher label
63
+
### Example 2: Apply the "Confidential" label to a single file, which requires justification
62
64
```
63
-
PS C:\> Set-AIPFileLabel -Path \\finance\projects\analysis.xlsx -LabelId d9f23ae3-1324-1234-1234-f515f824c57b -JustificationMessage 'The previous label no longer applies'
65
+
PS C:\> Set-AIPFileLabel -Path \\Finance\Projects\Analysis.xlsx -LabelId d9f23ae3-1324-1234-1234-f515f824c57b -JustificationMessage 'The previous label no longer applies'
64
66
FileName Status Comment
65
67
-------- ------ ------------
66
68
\\finance\projects\analysis.xlsx Success
67
69
```
68
70
69
-
This command labels a file as “Confidential” using a business justification.
70
-
This justification is used and logged when required by the policy, on cases of downgrade the label, remove the protection or clear the label.
71
+
This command sets the "Confidential" label for a file that is already labeled with a higher classification label. The Azure Information Protection policy is configured to require justification for lowering the classification label, removing a label, or removing protection. Because the command includes a justification message, the new label is successfully applied and the justification reason is logged on the local computer.
71
72
72
-
### Example 3: Apply “Internal” label on all files that are currently NOT labeled
73
+
### Example 3: Apply the "Internal" label to all files that do not currently have a label
This command identifies all files that are not labeled using the Get-AIPFileStatus cmdlet.
84
-
These files are then labeled using the Set-AIPFilelabel cmdlet.
84
+
This command first identifies all files that are not labeled by using the Get-AIPFileStatus cmdlet. Then, these files are labeled by specifying the "Internal" label by its ID.
85
85
86
-
### Example 4: Apply "Confidential" label on DOCX files that are not labeled
86
+
### Example 4: Apply the "Confidential" label to .docx files that are not labeled
This example first identifies all DOCX files in the c:\Projects folder (and its subfolders) using Get-Child-Item, then finds the files that are not labeled using the Get-AIPFileStatus cmdlet.
96
-
These files are then labeled using the Set-AIPFilelabel cmdlet.
97
-
Note: Get-Child-Item can be used with Get-AIPFileStatus as the FullName is an alias for Path.
95
+
This command first identifies all .docx files in the C:\Projects folder (and its subfolders) by using Get-Child-Item, then finds from these files the ones that are not labeled by using the Get-AIPFileStatus cmdlet. The resulting files are then labeled by specifying the "Confidential" label by its ID.
96
+
97
+
Note: This command makes use of the Path alias of FullName, so that Get-Child-Item can be used with Get-AIPFileStatus.
98
98
99
-
### Example 5: Remove a label from a file.
99
+
### Example 5: Remove a label from a file
100
100
```
101
-
PS C:\> Set-AIPFileLabel C:\Projects\analysis.docx -RemoveLabel -JustificationMessage 'The previous label no longer applies'
101
+
PS C:\> Set-AIPFileLabel C:\Projects\Analysis.docx -RemoveLabel -JustificationMessage 'The previous label no longer applies'
102
102
103
103
FileName Status Comment
104
104
-------- ------ ------------
105
-
C:\Projects\analysis.docx Success
105
+
C:\Projects\Analysis.docx Success
106
106
```
107
107
108
-
This command removes the Azure Information Protection label from C:\Projects\analysis.docx.
108
+
This command removes the existing label from the file named C:\Projects\Analysis.docx, and specifies a justification message that is required because the Azure Information Protection policy setting is enabled that requires justification for lowering the classification label, removing a label, or removing protection.
Specifies the path to the file or files to which you want to apply labels. When the path includes folders and subfolders, all files in these folders are automatically included. Wildcards are not supported.
146
+
Specifies a local or network path to the file or files to which you want to apply labels. Examples include C:\Folder\, C:\Folder\Filename, \\Server\Folder). Wildcards are not supported.
0 commit comments