This repository contains some PowerShell scripts and functions that I have used to carry out tasks on cloud resources through the years.
- Office 365
- Security & Compliance Center
- Licensing
- SharePoint PnP
- Azure
- Power Platform
Below is a breakdown of some of what you will find in this repository.
Script | Function | Description |
---|---|---|
PnP-FileRetention.ps1 | Add-FolderWithLabel | Adds a folder to a user's OneDrive or SharePoint Library and applies a retention label |
Please visit AlanPs1.io to learn more about what I do.
Firstly you will need to dot source the script
. .\PnP-FileRetention.ps1
Then you will run the following command
Add-FolderWithLabel -CertPass <Certificate Password> -UserPrincipalName "john.doe@contoso.com"
Other examples available using:
Get-Help Add-FolderWithLabel -Examples