Checking calendar permissions

Welcome Forums General PowerShell Q&A Checking calendar permissions

Viewing 2 reply threads
  • Author
    Posts
    • #211545
      Participant
      Topics: 7
      Replies: 6
      Points: 90
      Rank: Member

      Hello Everyone,

      I am trying to Import UPN address from CSV like username@domain.com to check calendar permissions but It’s not working for me. Please assist

      Here is my code

      $userlist = Import-Csv -path C:\CSV\calusers.csv
      FOREACH ($user in $userlist)
      {
      $name = $user.name

      Get-MailboxFolderPermission -identity$name:\calendar
      }

       

    • #211569
      Participant
      Topics: 12
      Replies: 1622
      Points: 2,560
      Helping Hand
      Rank: Community Hero

      I am trying to Import UPN address from CSV like username@domain.com to check calendar permissions but It’s not working for me. Please assist

      What does “not working” mean? An error? Nothing is returned? You should work on getting a single result before looping:

      $user = "john@contoso.com"
      
      Get-MailboxFolderPermission -Identity "$user:\Calendar"
      
    • #211863
      Participant
      Topics: 0
      Replies: 1
      Points: 6
      Rank: Member

      Hi!

      In the code you don’t have a space between -Identity and $Name. That would throw an error.

      It could be that the calendar is named in another language. Here is a bit of code that will find the calendar folder no matter what name it has:

      $Folder = Get-MailBoxFolderStatistics -Identity $Primarysmtpaddress | Where-Object {$_.foldertype -like “Calendar”}
            $identity = $primarysmtpaddress + “:\” + $folder.name
      Get-MailboxFolderPermission -identity $identity
Viewing 2 reply threads
  • You must be logged in to reply to this topic.