get-retentioncompliancepolicy is missing from security compliance module

Linsum 26 Reputation points
2022-12-14T05:52:04.767+00:00

I have all the access and able to get all the function available for ExchangeOnline but for security compliance i just able to view only 4 functions as below;

Function Delete-QuarantineMessage
Function Get-QuarantineMessage
Function Get-QuarantineMessageHeader
Function Preview-QuarantineMessage
Function Release-QuarantineMessage

So, how can i make the function available to use like 'Get-retentioncompliancepolicy'. currently if i try to run the function, it will prompt an error - " The term 'Get-RetentionCompliancePolicy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included"

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,178 questions
{count} vote

3 answers

Sort by: Most helpful
  1. Aholic Liang-MSFT 13,886 Reputation points Microsoft External Staff
    2022-12-15T08:41:57.49+00:00

    Hi @Linsum ,
    The cmdlet "Get-RetentionCompliancePolicy" is available only in Security & Compliance PowerShell.
    270934-2022-12-15-2.png
    Please re-open Windows PowerShell and refer to the link below to connect to Security & Compliance PowerShell:
    Connect to Security & Compliance PowerShell | Microsoft Learn


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. Rafael da Rocha 5,251 Reputation points
    2022-12-14T10:43:42.103+00:00

    Hello,

    the message would point to the permission not being set to any management role you are a member of.

    You can use the steps in the following documentation to find out what role, if any, is able to run that cmdlet

    Find the permissions required to run any Exchange cmdlet

    0 comments No comments

  3. Abdul Razak Shaikh 21 Reputation points
    2024-01-23T14:10:08.69+00:00

    #Activate the Compliance admin PIM role

    #Import the exchange online module and create a session with Security & Compliance center

    #Import-Module ExchangeOnlineManagement

    Connect-IPPSSession -UserPrincipalName "******@testeu.testmerckgroup.com"

    #Get current retention policy

    Get-RetentionCompliancePolicy

    #Disconnect the session

    Disconnect-ExchangeOnline -Confirm:$false

    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.