Forum Discussion

prakharathreya's avatar
prakharathreya
Copper Contributor
Feb 09, 2022

Is Get-PrivacyManagementRule a valid powershell command ?

I've been trying to figure out how a few security settings in the M365 tenant can be configured via Powershell. I was looking into Privacy Management in the admin console which has a bunch of settings I required, for eg- data retention period for Subject Right Requests.

I was not able to find anything in the Microsoft documentations, but after a few hit and trials I found a command - Get-PrivacyManagementRule . Turns out it has a lot of settings/parameters I was looking for. I'm currently not sure whether I can use this command or it will eventually be deprecated since there is literally NO information or documentation about this command from Microsoft.

It has a similar Set command too - Set-PrivacyManagementRule , but again with no documentation for it.

Can anyone with more info on this help me out ? Are these valid commands ?

  • farismalaeb's avatar
    farismalaeb
    Steel Contributor

    HI
    I dont know about this. Can you share where did you find this cmdlet? maybe it's not a native Microsoft cmdlet and its related to a third-party module.
    if you have the cmdlet in your PC , try to run get-command Get-PrivacyManagementRule

     

    • prakharathreya's avatar
      prakharathreya
      Copper Contributor

      farismalaeb I havent installed any 3rd party module.

       

      See the output of that command below:

       

      PS C:\Users\prakharathreya\Desktop> Get-Command Get-PrivacyManagementRule

      CommandType   Name                                     Version          Source
      ----------- ---- ------- ------ ----------- ---- ------- ----------------- ---- ------- ------
      Function            Get-PrivacyManagementRule  1.0                tmp_atkepqnj.kt1

      • farismalaeb's avatar
        farismalaeb
        Steel Contributor
        This is because the command has a remote session to a service
        try the following command

        Get-PSSession

Resources