outlook 2010 .nk2 or rename script

So i found the following information added as code saying about nk2 files not existing anymore, bla bla bla.  Fine.

Now my task was to backup our users .nk2 file on logoff and restore on login. We don't use roaming profiles and will not. But I was hoping to make outlook act like it was roaming, at least the contacts dropdown.  Now if this was still using .nk2 files it would be easy.

But now with random GUID's in the filename, how can I do this.  When a user logs onto anther PC with outlook, the file is created but with a diffrent filename. So i can't just replace the DAT file.


Any idea's or can someone write a script to find the current name and then copy/rename the backup file as that name. I guess thats the answer..
The Outlook 2003/2007 default NK2 file location is the same in Windows 7 x64 and x86 -- C:\Users\{username}\AppData\Roaming\Microsoft\Outlook\zzzzzzz.NK2 (z = Outlook profile name). This also applies to Vista and Server 2008.
 
The Outlook 2010 NK2 file is actually a DAT file and is located, on the above operating systems, at C:\Users\{username}\AppData\Local\Microsoft\Outlook\RoamCache\Stream_Autocomplete_y_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dat (y = file index, x = random 16-byte key in hex form).
 
 
 
If you haven't unchecked 'Hide extensions for known file types' under Tools > Folder Options > View, then the file will just be called "Outlook" or "Default" (whatever your Outlook profile is named), instead of Outlook.NK2 or Default.NK2. Also, Windows 7 classifies it as an "Office Data File" in the 'Type' column.
 
If this file is not present, Outlook will create a new one when you open the program. Hope this helps!

Open in new window

LVL 7
myhcAsked:
Who is Participating?
 
tharsternCommented:
The nk2 file gets imported once in Outlook 2010, then is always there for that user, no matter where they log on from, as it is stored in their mailbox in exchange.



0
 
myhcAuthor Commented:
tharstern,

Thank you for that information. I have tested and you are kinda correct. Just a little note, If you are running an Exchange 2003 server the data is not imported into the server.

Only when running Exchange 2010 or older i guess (might work with exchange 2007 but we missed this version)

We are moving from 2003 -> 2010 so we can wait.

Thanks for saving me some time...
0
 
myhcAuthor Commented:
Exchange 2010 and above
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.