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

How to choose best EC2 instance for the system

3  Asked on January 1, 2021 by user14108508

   

Equivalent of Firebase with PostGreSQL?

0  Asked on December 31, 2020 by dimitri-l

   

Sticky TCP sessions with IOT sensors

0  Asked on December 31, 2020 by quade

   

Failed to using powershell to get cookies

1  Asked on December 30, 2020 by pansal

     

Heroku.yml is not getting bash script

0  Asked on December 29, 2020 by shahrear-bin-amin

   

D-Link DGS-1210-28 factory reset

0  Asked on December 27, 2020 by andrey-salnikov

       

Ask a Question

Get help from others!

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