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 / Creating a DLP Policy ...
Power Apps
Unanswered

Creating a DLP Policy using PowerShell I get asked for EnvironmentType

(0) ShareShare
ReportReport
Posted on by 1,302

Hi

I am trying to create my PowerPlatform DLP Policy using PowerShell (like all good admins should).  I get the following request:-

 

PS C:\WINDOWS\system32> New-DlpPolicy -DisplayName "Test"

cmdlet New-DlpPolicy at command pipeline position 1
Supply values for the following parameters:
EnvironmentType:

 

What should I supply for EnvironmentType ?

 

If I look at the documentation via Get-Help I get this :-

 

PS C:\>New-DlpPolicy -NewPolicy $NewPolicy Creates a new policy with $NewPolicy object.

 

What is a $NewPolciyOBject ?

 

Thanks

 

Nigel

 

 

I have the same question (0)
  • Joel CustomerEffective Profile Picture
    3,224 on at

    Acceptable options are 1 or AllEnvironments, 2 or OnlyEnvironments, 3 or ExceptEnvironments for EntityType. 

     

    All Environments is tenant level

    Only Environments is environment specific

    ExceptEnvironments is all environments with exceptions

     

    I prefer creating dlp rules via the COE starter kit dlp manager app as it tells me what apps or flows will be impacted by a DLP change

  • NPrice99 Profile Picture
    1,302 on at

    Thanks @jlindstrom 

     

    If I was amending a Data Loss Policy, then certainly I would use the DLP Editor to see what the effect of changing the DLP would be on existing Apps.

     

    In my use case, I want to setup the DLP for a new Environment for a project team, so there would be no existing Apps.

     

    I want a repeatable process.

     

    Regards

     

    Nigel

  • Rc86 Profile Picture
    14 on at

    I'm having similar issues passing the 'Environment' parameter, the example in the documentation is -Environment $Environment.

     

    Rule number one of defining something, dont use it in it's own definition! Is there somewhere i should be looking for better documentation? 

     

    In the meantime can someone please enlighten me as to how to pass a valid value for -Environment ?

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 413

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
timl Profile Picture

timl 315 Super User 2026 Season 1

Last 30 days Overall leaderboard