Azure Information Protection Samples
This repository contains PowerShell snippets to demonstrate Azure Information Protection (AIP) functionality when interacting with the wider Microsoft cloud platform.
Checkout the Changelog to see what samples are currently avaialble.
The scripts are licensed "as-is." under the MIT License.
This will depend on whether samples are being run on the client or the cloud services (AzureIP or O365): * Client: install the current Azure Information Protection add-in (https://aka.ms/aipclient) * Cloud: depending on the samples run you will either need the PowerShell cmdlets installed with the client (refer to Additional resources for details) or see Connecting to Exchange Online PowerShell (https://docs.microsoft.com/en-us/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/connect-to-exchange-online-powershell?view=exchange-ps) * An account with permissions to administer the AIP and optionally O365 Service's * PowerShell v5.0 on Windows 10 x64 (PowerShell v4.0 is a minimum requirement for the scripts to function correctly)
After the prerequisites are installed or met, perform the following steps to use these scripts:
1. Script usage
- Download the contents of the repository to your local Windows machine
- Extract the files to a local folder (e.g. C:\Azure-Information-Protection-Samples)
- Run PowerShell x64 from the start menu
- Browse to the directory (e.g. cd C:\Azure-Information-Protection-Samples)
- For each Folder in the local repository you can browse to that directory and then run the script of your choice
- Most the scripts require authentication first. Auth examples can be found in the Authentication folder.
- Example Authentication script usage:
- To connect to the Exchange Online PowerShell use the script from C:\Azure-Information-Protection-Samples, run "cd .\Authentication\"
- Once in the folder run .\Authentictae to EXO.ps1 and select whether this needs to be via Exchange Online Protection (EOP) This sequence of steps can be used for each folder....
Some script samples retrieve information from your AIP and O365 tenant, and others may create, delete or update data in these tenants. Understand the impact of each sample script prior to running it; samples should be run using a non-production or "test" tenant.
Questions and comments
We're always interested in feedback. If you have any comments to share about the PowerShell samples you can send your questions and suggestions to us in the Issues section of this repository.
Your feedback is important to us. Connect with us on Stack Overflow. Tag your questions with [AzureIP].
- Admin Guide: Using PowerShell with the Azure Information Protection client
- Administering the Azure Rights Management service by using Windows PowerShell
- Exchange Online PowerShell
- Office 365 Security & Compliance Center PowerShell
- Azure Information Protection Blog
- Azure Information Protection Forum
- Azure Information Protection Product Feerdback
- Azure Information Protection Lab
Copyright (c) 2017 Microsoft. All rights reserved.