Commands › Exchange Online
New-SensitiveInformationScan
For more information, see Security & Compliance PowerShell. Use the New-SensitiveInformationScan cmdlet to create new on-demand classification scans. Learn more about on-demand classifications at On-demand classification.
Quick start script
# New-SensitiveInformationScan — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org
# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-SensitiveInformationScan
$before | Format-List
# 3. Make the change (dry run first)
New-SensitiveInformationScan -Name <String> -WhatIf
New-SensitiveInformationScan -Name <String>
# 4. Verify and diff
$after = Get-SensitiveInformationScan
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax
New-SensitiveInformationScan [-Name] <String>
[-Comment <String>]
[-Confirm]
[-EndpointDlpLocation <MultiValuedProperty>]
[-EndpointDlpLocationException <MultiValuedProperty>]
[-ExceptIfOneDriveSharedBy <RecipientIdParameter[]>]
[-ExceptIfOneDriveSharedByMemberOf <RecipientIdParameter[]>]
[-ExchangeLocation <MultiValuedProperty>]
[-ExchangeSender <SmtpAddress[]>]
[-ExchangeSenderException <SmtpAddress[]>]
[-ExchangeSenderMemberOf <RecipientIdParameter[]>]
[-ExchangeSenderMemberOfException <RecipientIdParameter[]>]
[-OneDriveLocation <MultiValuedProperty>]
[-OneDriveLocationException <MultiValuedProperty>]
[-OneDriveSharedBy <RecipientIdParameter[]>]
[-OneDriveSharedByMemberOf <RecipientIdParameter[]>]
[-PolicyRBACScopes <MultiValuedProperty>]
[-SharePointLocation <MultiValuedProperty>]
[-SharePointLocationException <MultiValuedProperty>]
[-TeamsLocation <MultiValuedProperty>]
[-TeamsLocationException <MultiValuedProperty>]
[-WhatIf]
[<CommonParameters>]
Parameters (22)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.