Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Governance and Administ...
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?

Categories:
  • TonyMcg1 Profile Picture
    50 on at
    Re: Mange which Environment is in which DLP with PowerShell - and remove from Tenant DLP

    This is great Thank you.

    we will get testing this next week

     

    Thank you again

  • Verified answer
    Pstork1 Profile Picture
    66,342 Most Valuable Professional on at
    Re: Mange which Environment is in which DLP with PowerShell - and remove from Tenant DLP

    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.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Apps Governance and Administering

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 11 Super User 2025 Season 1

#2
bscarlavai33 Profile Picture

bscarlavai33 5 Super User 2025 Season 1

#3
getsplash Profile Picture

getsplash 2

Overall leaderboard

Featured topics