Get-DlpCompliancePolicy cmdlet is missing

Prasanth J.k 40 Reputation points
2024-05-28T04:58:08.65+00:00

Get-DlpCompliancePolicy is missing or not found in PowerShell. I tried finding DLP console in Compliance portal but no luck. Is there anything I'm missing or is it due to license?

I'm currently using Microsoft 365 Standard.

Is there any document to check features and license?

Microsoft Security | Microsoft Purview
{count} votes

2 answers

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 90,651 Reputation points Moderator
    2024-05-28T11:22:48.0133333+00:00

    @Prasanth J.k - Thanks for the question and using MS Q&A platform.

    It seems like you are trying to use the Get-DlpCompliancePolicy cmdlet in PowerShell but it is not found. This cmdlet is used to retrieve data loss prevention (DLP) compliance policies in Microsoft 365.

    Regarding your question about the license, Microsoft 365 Standard includes DLP features. However, it is possible that the cmdlet is not available in your PowerShell module version.

    To check the features and license of your Microsoft 365 subscription, you can refer to the following document: https://docs.microsoft.com/en-us/microsoft-365/solutions/subscriptions-and-licenses-faq?view=o365-worldwide

    According to official documentation: Get-DlpCompliancePolicy

    This cmdlet is available only in Security & Compliance PowerShell. For more information, see Security & Compliance PowerShell.

    Use the Get-DlpCompliancePolicy to view data loss prevention (DLP) policies in the Microsoft Purview compliance portal.

    Regarding the missing cmdlet, you can try updating your PowerShell module to the latest version and check if the cmdlet is available. You can also try using the Microsoft 365 Compliance Center to manage your DLP policies.

    Connect to the Security & Compliance Center using PowerShell and run the Get-DlpCompliancePolicy cmdlet to see the DistributionStatus.

    PS C:\> Connect-IPPSSession
    
    
    PS C:\> Get-DlpCompliancePolicy "Testing - Australian PII" | Select DistributionStatus
    
    DistributionStatus
    ------------------
    Pending
    

    For more details, refer to How to Create and Manage DLP policies using PowerShell.

    Let me know if you have any further questions!


  2. Aaron Hamilton 1 Reputation point
    2024-12-31T18:42:09.4766667+00:00

    First step is to correctly authenticate by running Connect-IPPSSession. However, it may not work because it requires a separate, elevated instance of Powershell. You can accomplish this by running:

    Start-Process powershell -ArgumentList '-NoExit -Command "Connect-IPPSSession"'

    You will be prompted to log in. The account you use is important. I am not sure what the account needs, but I know that it only worked when I used Admin account. It failed when I authenticated as my account that has Compliance role. You know it fails because it does not result in a new Powershell window running under your elevated credentials.

    In this new elevated PS window, you will be able to locate and run this command:

    New-DlpCompliancePolicy 

    Hope this helps!

    Aaron

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.