Automatically open Outlook for the first time

I wanted to set up a script that would basically start the first Outlook 2010 for the first time and accept the default values. We have an exchange server that is currently running, which populates the first time fields with user user information. Basically, I wanted to write a script in powershell that would accept the default values ​​that AD populated and completed the installation. After the installation is complete, Outlook will configure a copy of the user's mailbox, and all their mail will be transferred to the computer.

I try and try in PowerShell to get defaults to no avail. Is there any possible way to associate a powershell script with an appearance and accept its dialog boxes?

I have not written any code for this, except for a small initialization of the script in powershell. I am also new to PowerShell, so I know enough to create a com object and call this object so that it can open Outlook, but this is as far as I can go.

Can someone please help me? Here is what I have, but it really doesn't work so well:

 $mail = new-object -com Outlook.Application $namespace = $mail.GetNamespace("MAPI") $folder = $namespace.GetDefaultFolder("olFolderInbox") $explorer = $folder.GetExplorer() $explorer.Display() 

+4
source share
2 answers

I ended up using the WASP snap-in http://wasp.codeplex.com/ . It allows you to automate the user interface by searching for widows and sending commands to these windows. It is easy to use and makes tasks like mine much easier. This is just a 32-bit .dll, but it works for Powershell> = 2.0. Thanks to everyone for your helpful comments.

+1
source

I'm not sure how much you got PowerShell, but check out this link .

Consider other Windows GUI scripting scenarios, they should solve this problem quite easily - easier than PowerShell scripts.

Try:

+2
source

Source: https://habr.com/ru/post/1413595/


All Articles