Mit Powershell Outlook Accounts auflisten

Folgendes Skript liest alle Outlook Accounts mit dem Usernamen aus:

$outlook = new-object -com Outlook.Application
$namespace = $outlook.GetNamespace("MAPI")
foreach ($account in $namespace.Accounts) {
Write-Host $account.DisplayName ": " $account.UserName


Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website