get Outlook shared Calendars

2022-11-18T12:07:53.217+00:00

Hi, I'm trying to get the shared calendars ( Appointment )from my exchange outlook email using powershell script, the script is below

# load the required .NET types  
Add-type -assembly "Microsoft.Office.Interop.Outlook" | out-null  
$olFolders = "Microsoft.Office.Interop.Outlook.OlDefaultFolders" -as [type]  
# access Outlook object model  
$outlook = new-object -comobject outlook.application  
# connect to the appropriate location  
$namespace = $outlook.GetNameSpace("MAPI")  
$folder = $namespace.getDefaultFolder($olFolders::olFolderCalendar)  
$folder.items | Select-Object -Property Subject, Start, End, Duration, Location  

and it's just displaying the the default calednars under a path for example john1234@harsh.com .com/Calendar
but the shared calendars does'n have a location ( path ), is there a way to get the data from this calendars ?

Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
516 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,390 questions
{count} votes