steve_o
steve_o

Reputation: 1243

Using Powershell to find Lotus Notes internet email address

Using Powershell, I need to retrieve an Internet email address from a Lotus Notes names.nsf address book.

Within Notes, I can see the internet email address I want to retrieve. It is on the Basics tab, under the Mail section, in a field called "Internet Address". However, I have not been able to find the view it is under, or a way to query it or derive it. It would also be helpful to filter the email addresses I would like to find by the Company on the "Work/Home" tab in Lotus Notes.

Opening one of the names.nsf files in IE, I see a number of the fields I want, but a formatted internet email address isn't in there. All I see is the Lotus notes style of email address:

firstname lastname/mycompany/abc @ abc

(The column name that is in is named $16).

Is there a way to pull the full internet email addresses from a Lotus Notes names.nsf address book? If so, how? If they are in some of the "hidden" views available, how do you query the values in those hidden views?

Thanks!

Upvotes: 0

Views: 3367

Answers (2)

bigguitar
bigguitar

Reputation: 1

You can access all of the properties for a given user from the NAB using powershell. You must run the 32 bit version of PS if your Notes client is 32 bit. You will be prompted for your Notes ID password.

  $notes=new-object -comobject Lotus.NotesSession;
  $notes.Initialize("");
  $ndb = $notes.getdatabase("admin","names.nsf");
  $nview = $ndb.getview('($Users)');
  $searchkey = "Schmoe"; #whatever
  $doc =$nview.getdocumentbykey($searchkey,$true);
  $mailaddress = $doc.getitemvalue('mailaddress')[0];
  $internetaddress = $doc.getitemvalue('internetaddress')[0];

Upvotes: 0

Richard Schwartz
Richard Schwartz

Reputation: 14628

In many cases, the best view to use for finding Person documents is the hidden view called "$Users". It is indexed by just about every variation of the name that you can think of, so lookups just tend to work. You can find it by opening the Person document from the view and reading the NotesItem named "InternetAddress", or you can read it directly from the view column that is labled "InternetAddress", which I believe is the 17th column.

Upvotes: 2

Related Questions