Author Archive

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

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

Mit Powershell E-Mails aus Outlook lesen

Momentan bastel ich noch an einem Skript, das mir E-Mails mit allen Attachments sauber auf die Festplatte speichert. Da mir noch wesentliche Kenntnisse der Outlook Architektur fehlen, ist es nicht ganz einfach. Im Moment scheitere ich noch daran, rekursiv durch alle Ordner durchzugehen und die Anzahl der enthaltenen E-Mails auszugeben. Folgendes Skript macht das nur bis zur zweiten Ebene.

$outlook = new-object -com Outlook.Application
$namespace = $outlook.GetNamespace("MAPI")
$inbox = $outlook.Session.GetDefaultFolder(6)
 
# iterate through folders
foreach ($folder in $namespace.Folders) {
    Write-Host $folder.name, $folder.count
 
foreach ($subfolder in $folder.Folders) {
    Write-Host "  >" $subfolder.name
 
}}

Die Anzahl der E-Mail bekomme ich für die Unterordner raus:

$outlook = new-object -com Outlook.Application
$namespace = $outlook.GetNamespace("MAPI")
 
# iterate through folders
foreach ($folder in $namespace.Folders) {
    Write-Host " " 	$folder.name " enthält " $folder.Items.Count 
 	foreach ($subfolder in $folder.Folders) {
    	Write-Host "   >" 	$subfolder.name " enthält " $subfolder.Items.Count 
}}

Dank Hilfe aus dem Internet habe ich jetzt folgenden funktionierenden Code:

$outlook = new-object -com Outlook.Application
$namespace = $outlook.GetNamespace("MAPI")
$inbox = $outlook.Session.GetDefaultFolder(6)
 
function Get-MailboxFolder($folder)
{   
    "{0}: {1}" -f $folder.name, $folder.items.count
 
    foreach ($f in $folder.folders)     {       
        Get-MailboxFolder $f       
    }   
}
 
# iterate through folders
foreach ($folder in $namespace.Folders) {
   Get-MailboxFolder $folder 
}

Uwe

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

Temperatur messen mit dem Arduino

Heute habe ich mit dem Arduino mal Temperaturen eines LM35 Sensors ausgemessen. Glücklicherweise gibt es den Code fertig bei http://www.mats-vanselow.de/2009/03/25/temperaturen-messen-mit-arduino, allein hätt ich mich da schwer getan.

Als nächster Schritt bleibt das Twittern der Temperatur, erste Versuche waren nicht erfolgreich.

Uwe

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

PowerGUI, alternative IDE für Powershell

Mit PowerGUI steht eine recht möchtige Entwicklungsumgebung für Powershell bereit. Informationen und Download findet man unter http://www.powergui.org/index.jspa.

Uwe

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

Keys von installierter Microsoft-Software auslesen

Chip online hat einen Link zu ProduKey, einer Software die die Installationsschlüssel von installierter MS Software auslesen kann. Wenn man den eigenen Schlüssel verschusselt hat, kann man ihn so wieder ermitteln.

http://www.chip.de/downloads/ProduKey_38097950.html

Uwe

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

Mit Powershell Outlook Attachments abspeichern

Ich bin heute durch intensives Googeln auf eine elegante Art gestoßen, Outlook Attachments in einem Rutsch abzuspeichern.

# Kiron, March 12 2009 in microsoft.public.windows.powershell
$outlook = new-object -com Outlook.Application
$inbox = $outlook.Session.GetDefaultFolder(6)
foreach ($group in $inbox.items |% {$_.attachments} | group filename) {
   trap {
   Write-Host There was a problem saving $fName
   continue
}
 
$fName = "C:\TEMP\emails\$($group.Name)"
$group.Group[0].saveasfile($fName)
if ($?) {
   Write-Host $fName was saved succesfully.
 }
}

Echt praktisch, mit 10 Zeilen Skripting solche Funktionalität…

Uwe

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

BibLaTeX – Übersicht der Eintragsfelder

Weil BibLaTeX als Ersatz für BibTeX immer interessanter wird, habe ich mal eine Übersicht erstellt, welche Felder in den einzelnen Eintragstypen Pflicht und welche optional sind. Zu finden ist das Dokument als PDF bei scribd.com: http://www.scribd.com/doc/20018626/BibLatex .

Habe die Datei grad aktualisiert, bei der alten Version hat leider die Legende gefehlt. Hier noch der Link zu den beiden Dateien: http://uweziegenhagen.de/latex/documents/biblatex/.

Uwe

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

Notepad++ 3.5

Der freie Editor Notepad++ ist erschienen: http://www.golem.de/0909/69983.html.

Interessant ist hier vor allem die Markierung rechteckiger Abschnitte im Text, das geht aber auch mit Emacs, UltraEdit kann es auch schon seit Jahren.

Uwe

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

25 iPhone Apps, auf die man nicht verzichten sollte

finden sich in einem Artikel der chip: http://www.chip.de/artikel/Kostenlos-25-iPhone-Apps-auf-die-Sie-nicht-verzichten-sollten_37805355.html.

Uwe

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

75 Flash-Games bei chip.de

Eine Liste von Spielen, die komplett im Browser gespielt werden könne, findet sich bei chip.de: http://www.chip.de/bildergalerie/Die-75-besten-Online-Flash-Games-Galerie_38018174.html

Uwe

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