Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script or GPO to remove Outlook POP3 settings?

Status
Not open for further replies.

Daveyd123

MIS
Aug 25, 2004
413
US
Prior to our installation of Exchange 2003, all users used an external POP3 account to send/receive email. The account settings are setup for each user in Outlook.

When we added our own Exchange server we had to configure everyones Outlook to use Exchange and the external email account.

We are now getting rid of the external email account.

My question is, is there a GPO or a script that could automatically remove the users POP3 settings in Outlook? We have 500+ computers and I don't feel like logging into each PC and deleting the POP3 accounts
 
You could probably use the MS Office Resource Kit that is appplicable to your version. Then you can create a new auto install with a mst file or and update install. I think with a little configuration you can get it to do what you like.
This may require you to setup a MS Administration Point. Then you can use a GPO to force the install/upgrade.
 
I know with OL2003 once you create the MST file you can set it so that the only connections that can be made within OL is an Exch connector, all others will be greyed out.. :)

Another thing I do is block all pop3 ports at the company firewall except for our email server. So no one can retrieve any mail that could bypass virus scanning.
I am also looking at using a GPO to setup the XP firewall on all workstations to do this when they are out of the office.
 
We have already installed Office 2003 via Group Policy. I used a .mst file to configure some settings.

Office was installed via GPO and after each installation, we configured everyone's Outlook Exchange settings and we manually entered the external POP3 settings. (I know I should have put those settings in the mst to begin with...d'oh!!)

So, now that all workstations have had Office 2003 installed via Group Policy (with a .mst) and the POP3 settings have been manually entered on all workstations...what do I need to do to delete all POP3 settings on all workstations and just leave the Exchange settings?





 
I have never done this but if my memory is working you may be able to either update the existing settings or you may be forced to reset the profile

I beleive you can do this with the OL2003 RK and use the Custom Maintenance Wizard (CMW). This will allow you to make the changes you want to the already installed Office Suite with out reinstalling it.

The setting to disable account creation
OL2003-Tools|Email Accts-Misc-prevent users from adding email account types on pg 7 of the CMW

Then on pg 12 of the CMW try Modify the profile, you may need to create a new one if that doesn't work.

Like I said i have never done this but it would seem you should be able to do this.. Just try it on a test computer and see what happens.

Another options is to re create a new MST file using the Custom Installation Wizard (CIW). In the Wizard pgs 13-16 are all about Exchange Settings, Adding/Removing Accounts which are greyed when using the CMW.
 
I'll give it a try...

Since the Office software package GPO is already linked to multiple OUs, would just changing the original .mst file automatically force a computer to use the newly created .mst once they rebooted? If not, how would you force the new .mst onto computers
 
You should be able to create a new mst then just rename the old mst file and make the new mst file the same as the original.
 
Yea, I know...my question is...will that new mst get automatically applied via GPO when the computers are rebooted and logged onto?
 
I wouldn't think so.. if you go and edit the GPO with the software installation you can right click the software pkg and there is an option to ReDeploy Application which should force it out again and it will read the new mst...

once again I have not had an opportunity to use this.

Hope this helps or points you in the right direction
 
One problem using the Custom maitenance Wizard....On page 7 under Microsoft Outlook 2003...Tools|E-mail Accounts...The only thing I have listed there is "Exchange over the Internet" and "Cached Exchange Mode" folders
 
You missed on level "Misc.."
OL2003->Tools|Email Accts->Misc->Prevent users from adding email account types

This may only stop the creation of new accounts and may not clear the old pop3 but its worth a try.. like I said earlier you may just need to modify your current mst file and then redeploy the entire install..
 
Well, I created a new mst and in the mst I chose to create an entire new profile with just the Exchange settings. I overwrote the old mst.

I chose to redeploy the Office 2003 GPO

I rebooted the PC and the same Outollk profile was there with the external POP3 settings :(
 
Here is another page that explains the PRF file.. I think this will be the key to your pop3 problem... There are a few links at the bottom as well that you may need to read..


But its looking like you may need to create new profiles for each staff that have a pop3 unless you can find a way to access the Remove Accounts and Export settings page in the CIW or CMW.
 
This may be an option too... it is from the post

/importprf prffilename

Launches Outlook and opens/imports the defined MAPI profile (*.prf). If Outlook is already open, queues the profile to be imported on the next clean launch.

I was thinking if you create a std profile for your users then you could have them run this probably once and from the caption it will import these settings..

Sorry I couldn't be anymore help...
 
OK...I am getting somewhere...

I created a .prf file and put it on a shared drive.

I can run outlook.exe /importprf \\server\share\profile.prf from the run command and it works great.

However, I want to entirely automate this process and not have each user type in the above command.

How would I be able to enter the above command and have it run only one time when a user logs in? I don't want it to run everytime a user logs in, just one time to setup the new profile.

Would this be something to put in the registry in the RunOnce key? If so, what would be the syntax?
 
You would want to create a login script, have it write a custom registry entry and use that to test if the script has run before. If it has run then have it exit the script, otherwise have it use WSHShell.Run to execute the command.

Take a look at my FAQ faq329-5798 for some examples.


I hope you find this post helpful.

Regards,

Mark
 
The problem with using the Runonce is you have no way of knowing it worked. A perosn could be on vacation with their PC off and never get that added to their machine. If the code to add it to the run once remains on the network it is the same as run always since it will constanty get added back.

I hope you find this post helpful.

Regards,

Mark
 
Thanks for the info...I am a newbie to scripting so please bear with me.

Here's what I have done so far...

On a test machine, I created a String Value in the RunOnce key and pointed it to \\server\share\office2003\test.bat

The test.bat file syntax is:
c:\progra~1\micros~2\office11\outlook.exe /importprf \\server\share\office2003\profile.prf
exit

When I log in to the computer, the batch file kicks off, outlook opens up and a new Outlook profile is created....however...the only problem is the command window and Outlook remain open and nothing else can happen until Outlook is closed

Questions...

How do I get the command window and outlook to close automatically after the batch file is run? I added a line to kill the outlook.exe process but that doesnt run until after Outlook is closed...kinda defeating the purpose

Could I script something to automatically add the RunOnce value to all computers in the Domain and tell the script not to install the Value if it has already run? If so, what would the syntax be?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top