I'm writing a script actually that deletes some elements from the public folder "favorites" in Outlook 2010. I now want to create a shortcut from the folder "all public folders" to "favorites", but I don't no how to do this. I start the following:
#Create Outlook instanz from current process
$ol=[Runtime.Interopservices.Marshal]::GetActiveObject('Outlook.Application')
#Creating Namespace
$namespace = $ol.GetNamespace("MAPI")
Taking the folder source path from the "all public folders" and taking my destination port in "favorites"
If I start with
$ol.copyfiles($source, $destination)
it tells my, that copying is not allowed only linking/shortcut, but that's the problem I can't find any way (cmdlet) to make a shortcut or link.
Thanks for help
EDIT: I am already at that point
#Delete Linked folder from favorites
$namespace.folders.item(1).folders.item(1).folders.item(1).delete
So how can I create a new shortcut underneath?