Translate this site using Windows Live Translator:
Welcome to TechNet Blogs Sign in | Join | Help

RMS: Protecting Your Assets.

The Protecting 'My' Asset Disclaimer: This is my 'un-official', 'in my spare time', 'use at your own risk', all things RMS (Rights Management Services), IRM (Information Rights Management), IPP (Information Protection Platform), and a bunch of other acronyms I bet you've never heard of, blog.
A quick a dirty script to identify RMS content, and it's owner.

I wrote this script a while back that shows a quick way to scan all documents in a folder, and see if it is rights protected, then display the file name, and the owner. It's not pretty, but it gets the job done.

I had someone ask me for it, and it took a while to find it so now I'm posting it here. As usual..do some error checking, indenting, and clean-up work. :)

strFolder = "C:\RMSTest"  '*** Specify a folder here, or use an InputBox ****
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFolder = fso.GetFolder(strFolder)
Set objFiles = objFolder.Files
For each oFile in objFiles
 Set oStream = oFile.OpenAsTextStream
 Do While Not oStream.AtEndOfStream
  strString = oStream.ReadLine
  imid = instr(1,strString,"<OWNER>")
  ilen = instr(1,strString,"</OWNER>") - instr(1,strString,"<OWNER>")
  If instr(1,strString,"<OWNER>") then
   strString = mid(strString,imid,ilen)
   imid = instr(1,strString,"<NAME>")
   ilen = instr(1,strString,"</NAME>") - instr(1,strString,"<NAME>")
   strOwner = mid(strString,imid,ilen)
   strOwner = right(strOwner,len(strOwner)-6)
   exit Do
  Else
   strOwner = "Not RMS Protected"
  End If
 Loop
Wscript.Echo oFile.Name & ": " & strOwner
Next

-Jason

Published Wednesday, December 10, 2008 2:38 PM by Jason Tyler

Comments

# re: A quick a dirty script to identify RMS content, and it's owner. @ Thursday, March 19, 2009 11:24 AM

I'm wondering is it possible to create RMS-protected email using VBA?

Could you please share some samples of doing that?

RomanF

Anonymous comments are disabled
Page view tracker