web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Mange which Environmen...
Power Apps
Answered

Mange which Environment is in which DLP with PowerShell - and remove from Tenant DLP

(0) ShareShare
ReportReport
Posted on by 50

Looking to automate the admin tasks we hav eto do in our powerplatform.

Using powershell to add th ecommans to our pipline.

I can see th ecommand to to create DLPs and add connectors to DLPs liek this:

 

Add-ConnectorToBusinessDataGroup -PolicyName 'PolicyName' –ConnectorName 'ConnectorName'

 

But cannot see a PowerShell command to assign Enviroments to a DLP, remove an Environment form a DLP.

Exclude Environment form Tenant DLP.

 

Does anyone have details on to do this with PowerShell?

I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    69,623 Most Valuable Professional on at

    You can use the Set-AdminDlpPolicy to create include or exclude filters on environments.  Here are some examples

    -------------------------- EXAMPLE 2 --------------------------
     
     PS C:\>Set-AdminDlpPolicy -PolicyName 78d6c98c-aaa0-4b2b-91c3-83d211754d8a -FilterType Include -Environments 
     "febb5387-84d7-4717-8345-334a34402f3d,83d98843-bfd7-47ef-bfcd-dc628810ae7b"
     
     Only applies the policy to the environments febb5387-84d7-4717-8345-334a34402f3d and 
     83d98843-bfd7-47ef-bfcd-dc628810ae7b.
     
     
     
     
     -------------------------- EXAMPLE 3 --------------------------
     
     PS C:\>Set-AdminDlpPolicy -PolicyName 78d6c98c-aaa0-4b2b-91c3-83d211754d8a -FilterType Exclude -Environments 
     "febb5387-84d7-4717-8345-334a34402f3d,83d98843-bfd7-47ef-bfcd-dc628810ae7b"
     
     Applies the policy to all environments except febb5387-84d7-4717-8345-334a34402f3d and 
     83d98843-bfd7-47ef-bfcd-dc628810ae7b.
  • TonyMcg1 Profile Picture
    50 on at

    This is great Thank you.

    we will get testing this next week

     

    Thank you again

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 400 Most Valuable Professional

#2
11manish Profile Picture

11manish 141 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard