Is Get-PrivacyManagementRule a valid powershell command ?

%3CLINGO-SUB%20id%3D%22%5C%26quot%3Blingo-sub-3141398%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3EIs%20Get-PrivacyManagementRule%20a%20valid%20powershell%20command%20%3F%26lt%3B%5C%2Flingo-sub%26gt%3B%3CLINGO-BODY%20id%3D%22%5C%26quot%3Blingo-body-3141398%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CP%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EI've%20been%20trying%20to%20figure%20out%20how%20a%20few%20security%20settings%20in%20the%20M365%20tenant%20can%20be%20configured%20via%20Powershell.%20I%20was%20looking%20into%20Privacy%20Management%20in%20the%20admin%20console%20which%20has%20a%20bunch%20of%20settings%20I%20required%2C%20for%20eg-%20data%20retention%20period%20for%20Subject%20Right%20Requests.%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EI%20was%20not%20able%20to%20find%20anything%20in%20the%20Microsoft%20documentations%2C%20but%20after%20a%20few%20hit%20and%20trials%20I%20found%20a%20command%20-%26nbsp%3B%3CSTRONG%3EGet-PrivacyManagementRule%26lt%3B%5C%2FSTRONG%26gt%3B%26nbsp%3B.%20Turns%20out%20it%20has%20a%20lot%20of%20settings%2Fparameters%20I%20was%20looking%20for.%20I'm%20currently%20not%20sure%20whether%20I%20can%20use%20this%20command%20or%20it%20will%20eventually%20be%20deprecated%20since%20there%20is%20literally%20NO%20information%20or%20documentation%20about%20this%20command%20from%20Microsoft.%26lt%3B%5C%2FP%26gt%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EIt%20has%20a%20similar%20Set%20command%20too%20-%20%3CSTRONG%3ESet-PrivacyManagementRule%26lt%3B%5C%2FSTRONG%26gt%3B%20%2C%20but%20again%20with%20no%20documentation%20for%20it.%26lt%3B%5C%2FP%26gt%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3ECan%20anyone%20with%20more%20info%20on%20this%20help%20me%20out%20%3F%20Are%20these%20valid%20commands%20%3F%26lt%3B%5C%2FP%26gt%3B%26lt%3B%5C%2Flingo-body%26gt%3B%3CLINGO-LABS%20id%3D%22%5C%26quot%3Blingo-labs-3141398%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CLINGO-LABEL%3EOffice%20365%26lt%3B%5C%2Flingo-label%26gt%3B%3CLINGO-LABEL%3EPowerShell%26lt%3B%5C%2Flingo-label%26gt%3B%3CLINGO-LABEL%3EPrivacy%26lt%3B%5C%2Flingo-label%26gt%3B%3CLINGO-LABEL%3ESecurity%26lt%3B%5C%2Flingo-label%26gt%3B%26lt%3B%5C%2Flingo-labs%26gt%3B%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FLINGO-SUB%3E
New Contributor

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 ?

7 Replies

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

 

@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

This is because the command has a remote session to a service
try the following command

Get-PSSession

It's the ExchangeOnline session

 

Id Name ComputerName ComputerType State ConfigurationName Availability
-- ---- ------------ ------------ ----- ----------------- ------------
5 ExchangeOnli... nam10b.ps.co... RemoteMachine Opened Microsoft.Exchange Available

@prakharathreya 

I try to import the exchange management online module and I did not find the command.

even in exchange, I did not see a feature related to Privacy Rule Management.

I think you are using an outdated version, still not sure.

Let me know what are you looking to achieve?

 

Try to Connect to IPPSession first using below command:
Connect-IPPSSession

It works only when I'm connected to it.

@prakharathreya 

I agree with you, 

The command is valid and is supported till now, but seems there is no documentation any where.

I checked GitHub and tried to find documentation, but nothing found.

But if the command help you, feel free and keep using it as its still valid and supported.

Hope this answer help