AnswerBun.com

Get list of Outlook Favorite Item via Powershell

Server Fault Asked by Biren on December 9, 2020

Hy Guys, I Trying Get list of Outlook Favorite Item via Powershell, but i couldn’t, I have created the script for Inbox and others, it’s working, but having trouble with favorite item, can anyone help to do same for Favorite, really apricated if you can

$Outlook = New-Object -com Outlook.Application
$Namespace = $outlook.GetNamespace("MAPI")
$PublicFolder = $Namespace.Folders.Item("Favoirets – [email protected]")

enter image description here

2 Answers

This code will list Favorites

$ol = New-Object -ComObject Outlook.Application
$ex = $ol.Application.ActiveExplorer()
$mm = $ex.NavigationPane.Modules.GetNavigationModule(0)
$favorites = $mm.NavigationGroups.GetDefaultNavigationGroup(4)
$favorites.NavigationFolders | Select-Object -ExpandProperty folder | Select-Object FolderPath

Correct answer by jfrmilner on December 9, 2020

I found a similar thread for your reference: Get list of Outlook Favorite Item via Powershell

The script to fix your problem is similar with jfrmilner's:

$OutlookObject=New-Object -ComObject Outlook.Application
$ActiveExplorer=$OutlookObject.Application.ActiveExplorer()
$NModule=$ActiveExplorer.NavigationPane.Modules.GetNavigationModule(0)
$FavFolder=$NModule.NavigationGroups.GetDefaultNavigationGroup(4)
$FavFolder.NavigationFolders|select -expand folder|select Name | Out-File -FilePath "C:Favourite.txt"

Answered by Ivan_Wang on December 9, 2020

Add your own answers!

Related Questions

Action log of last ssh login

2  Asked on January 15, 2021 by andrewl64

     

Ansible loops and conditions with arrays

1  Asked on January 14, 2021 by eviltorbalan

   

DB2 Integrity Checks and Exception Tables

1  Asked on January 14, 2021 by imthefirestartr

         

MySql Can’t Start on Ubuntu 20.04 LTS

0  Asked on January 13, 2021 by john-gab-tolentino

   

Opera Mini Compression Technology

0  Asked on January 13, 2021 by myzel394

     

What does systemd “thawing” mean?

0  Asked on January 12, 2021 by johannes-ernst

 

Strongswan transport mode ipsec within subnet

1  Asked on January 12, 2021 by viraptor

     

SuperMicro Servers can’t detect ALL Disk attached to SAS

0  Asked on January 11, 2021 by sami-satti

   

Zabbix key with comma

1  Asked on January 11, 2021 by pawe-zimny

 

Zabbix doesn’t run custom alert script

1  Asked on January 11, 2021 by alfred-balle

   

SQL Server 2012 Native Client returns missing DLL error on install

1  Asked on January 10, 2021 by user306594

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP