How to Unprotect a Document with PowerShell

Copper Contributor

If you can't currently sign out of the AIP client, what is the best way to unprotect a document with an administrative account using PowerShell? Will I have to log into the computer with an unlicensed account so that the AIP module prompts for credentials?

3 Replies

Have you checked the documentation here: https://docs.microsoft.com/en-us/information-protection/rms-client/client-admin-guide-powershell

 

The module can use both interactive and non-interactive login, depending on what your goal is. If you have a user with "super user" permissions, or enough permissions on the file, you can just run the Unprotect-RMSFile and provide the credentials when asked. Otherwise, follow the instructions in the above article.

Yes, I have seen that. The problem is that I don't get prompted for credentials. It is using the currently logged on user's credentials. I was wondering if I could use different credentials while still logged in with the licensed user (that doesn't have permission to unprotect the file).

Well, we dont have currently an option to sign out, you have to manually clear the token cache from registry (

HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\MSIPC\pscmdlet\server_GUID) and the filesystem (%LocalAppData%\Microsoft\MSIPC\pscmdlet\Auth). Then you should be prompted for credentials.