Jump to content

Outlook und Powershell


Der letzte Beitrag zu diesem Thema ist mehr als 180 Tage alt. Bitte erstelle einen neuen Beitrag zu Deiner Anfrage!

Recommended Posts

Posted

Hallo,

ich will ein bisschen mit der Powershell und Office 2016 (erst einmal speziell Outlook) herumspiele und Scheiter schon an der ersten Hürde :( 

Ich fülle eine Variable mit dem Befehl:

$OL = New-Object -ComObject outlook.application

Schaue ich mir die Variable, müsst doch eigentlich mehr stehen als dieses stehen, oder?

PS D:\> $O
Application        : 
Class              : 
Session            : 
Parent             : 
Assistant          : 
Name               : 
Version            : 
COMAddIns          : 
Explorers          : 
Inspectors         : 
LanguageSettings   : 
ProductCode        : 
AnswerWizard       : 
FeatureInstall     : 
Reminders          : 
DefaultProfileName : 
IsTrusted          : 
Assistance         : 
TimeZones          : 
PickerDialog       : 

Woran kann das liegen?
 

 

Posted
vor 21 Minuten schrieb Peterzz:
 

Woran kann das liegen?

Wie Dukel schon richtig bemerkt ... am falschen Namen. ;-)  ... im Zweifel einfach die Tab-Vervollständigung von Powershell nutzen ... $O<tab>  und <Enter>  ... 'macht natürlich mehr Sinn bei längeren Namen, bei denen sich auch eher mal vertippt. 

Posted

Typo... Das wird schon ein Outlook-Objekt sein, sonst hätte es nicht diese Properties - auch wenn die nicht leer sein dürften.

Ich kann allerdings auch nur die Glaskugel fragen, und die ist ziemlich trübe - hier mit O2016 kommt das raus:

PS C:\WINDOWS\system32> $OL = New-Object -ComObject outlook.application
$OL


Application        : Microsoft.Office.Interop.Outlook.ApplicationClass
Class              : olApplication
Session            : Microsoft.Office.Interop.Outlook.NameSpaceClass
Parent             : 
Assistant          : 
Name               : Outlook
Version            : 16.0.0.13328
COMAddIns          : System.__ComObject
Explorers          : {}
Inspectors         : {}
LanguageSettings   : System.__ComObject
ProductCode        : {90160000-000F-0000-1000-0000000FF1CE}
AnswerWizard       : 
FeatureInstall     : msoFeatureInstallOnDemand
Reminders          : {$null, $null, $null, $null...}
DefaultProfileName : Outlook
IsTrusted          : False
Assistance         : System.__ComObject
TimeZones          : {System.__ComObject, System.__ComObject, System.__ComObject, System.__ComObject...}
PickerDialog       : System.__ComObject

Kann es sein, daß es auf dem Rechner zwar Outlook gibt, aber kein Profil eingerichtet ist?

Posted
15 hours ago, Dukel said:

$OL ?

Der Name war/ist richtig, habe es nur falsch eingefügt :(

 

9 hours ago, daabm said:

Kann es sein, daß es auf dem Rechner zwar Outlook gibt, aber kein Profil eingerichtet ist?

Auf dem Rechner ist ein aktuelles 32-Bit Outlook 2016 (16.0.5071.1000) installiert. Das Outlook besitzt mehrere Profile, habe es aber auch ohne Erfolg mit nur einem Profil ausprobiert.

Werde später mal das Profil löschen und neu anlegen. Mal sehen was dann passiert.

Der letzte Beitrag zu diesem Thema ist mehr als 180 Tage alt. Bitte erstelle einen neuen Beitrag zu Deiner Anfrage!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...