Outlook object model












0















I am writing a PowerShell script to share calendars.
The script works, but the thing is I can't edit the permissions and the default is "Availability Only". I want to give "Full Details".



P.S. - Can't use native Exchange cmdlets.



Add-Type -Assembly "Microsoft.Office.Interop.Outlook"
$Outlook = New-Object -ComObject Outlook.Application
$namespace = $Outlook.GetNameSpace("MAPI")

$Calendar = $Outlook.Session.Session.Folders.Item(1)
$Calendar = $Calendar.Folders.Item("Calendar")

$CalendarShare = $namespace.CreateSharingItem($Calendar)
$CalendarShare.To = "somemail@mail.com"
$CalendarShare.Send()









share|improve this question





























    0















    I am writing a PowerShell script to share calendars.
    The script works, but the thing is I can't edit the permissions and the default is "Availability Only". I want to give "Full Details".



    P.S. - Can't use native Exchange cmdlets.



    Add-Type -Assembly "Microsoft.Office.Interop.Outlook"
    $Outlook = New-Object -ComObject Outlook.Application
    $namespace = $Outlook.GetNameSpace("MAPI")

    $Calendar = $Outlook.Session.Session.Folders.Item(1)
    $Calendar = $Calendar.Folders.Item("Calendar")

    $CalendarShare = $namespace.CreateSharingItem($Calendar)
    $CalendarShare.To = "somemail@mail.com"
    $CalendarShare.Send()









    share|improve this question



























      0












      0








      0








      I am writing a PowerShell script to share calendars.
      The script works, but the thing is I can't edit the permissions and the default is "Availability Only". I want to give "Full Details".



      P.S. - Can't use native Exchange cmdlets.



      Add-Type -Assembly "Microsoft.Office.Interop.Outlook"
      $Outlook = New-Object -ComObject Outlook.Application
      $namespace = $Outlook.GetNameSpace("MAPI")

      $Calendar = $Outlook.Session.Session.Folders.Item(1)
      $Calendar = $Calendar.Folders.Item("Calendar")

      $CalendarShare = $namespace.CreateSharingItem($Calendar)
      $CalendarShare.To = "somemail@mail.com"
      $CalendarShare.Send()









      share|improve this question
















      I am writing a PowerShell script to share calendars.
      The script works, but the thing is I can't edit the permissions and the default is "Availability Only". I want to give "Full Details".



      P.S. - Can't use native Exchange cmdlets.



      Add-Type -Assembly "Microsoft.Office.Interop.Outlook"
      $Outlook = New-Object -ComObject Outlook.Application
      $namespace = $Outlook.GetNameSpace("MAPI")

      $Calendar = $Outlook.Session.Session.Folders.Item(1)
      $Calendar = $Calendar.Folders.Item("Calendar")

      $CalendarShare = $namespace.CreateSharingItem($Calendar)
      $CalendarShare.To = "somemail@mail.com"
      $CalendarShare.Send()






      powershell outlook com






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 2 at 17:10







      Roee Ziv

















      asked Jan 1 at 18:46









      Roee ZivRoee Ziv

      11




      11
























          1 Answer
          1






          active

          oldest

          votes


















          1














          Why are you doing this using Outlook, VS using native Exchange cmdlets to set the ACL?



          You just grant the Calendar permission role of Reviewer, which is the same thing that provided when trying to set 'Full Details' calendar permission.



          For example.



          Add-MailboxFolderPermission for every Mailbox



          Set-CalendarPermissions # of course this is a script from the gallery, but it's using Exchange cmdlets.



          It's really doing stuff like this...



          # Review permissions
          Get-MailboxFolderPermission -identity 'username:Calendar'

          # Set permissions
          Add-MailboxFolderPermission -identity 'username:Calendar' -user 'personalassistant' -AccessRights Reviewer





          share|improve this answer


























          • Unfortunately, this option is unavailable to me... (Can't use native Exchange cmdlets)

            – Roee Ziv
            Jan 2 at 8:02











          • @Roee Ziv : are you sure? Even users have (by default) permissions to do Get-Mailbox (only returns their own mailbox) or Add-MailboxFolderPermission. Just checked this on my 365 tenant with a regular user account and importing a PS Session gives me 154 cmdlets to use (even in Exchange 2010 you had a lot of CMDlets available to users).

            – bluuf
            Jan 2 at 18:11













          • As for 'Unfortunately, this option is unavailable to me... (Can't use native Exchange cmdlets)', you need permissions on the user's mailboxes to do this, if you do not have that permission, there is nothing you can do, regardless of language you try to use. This is an Exchange Admin control. So, you have to get your Exchange Admin to set this ACL.

            – postanote
            Jan 2 at 21:41













          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53998027%2foutlook-object-model%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Why are you doing this using Outlook, VS using native Exchange cmdlets to set the ACL?



          You just grant the Calendar permission role of Reviewer, which is the same thing that provided when trying to set 'Full Details' calendar permission.



          For example.



          Add-MailboxFolderPermission for every Mailbox



          Set-CalendarPermissions # of course this is a script from the gallery, but it's using Exchange cmdlets.



          It's really doing stuff like this...



          # Review permissions
          Get-MailboxFolderPermission -identity 'username:Calendar'

          # Set permissions
          Add-MailboxFolderPermission -identity 'username:Calendar' -user 'personalassistant' -AccessRights Reviewer





          share|improve this answer


























          • Unfortunately, this option is unavailable to me... (Can't use native Exchange cmdlets)

            – Roee Ziv
            Jan 2 at 8:02











          • @Roee Ziv : are you sure? Even users have (by default) permissions to do Get-Mailbox (only returns their own mailbox) or Add-MailboxFolderPermission. Just checked this on my 365 tenant with a regular user account and importing a PS Session gives me 154 cmdlets to use (even in Exchange 2010 you had a lot of CMDlets available to users).

            – bluuf
            Jan 2 at 18:11













          • As for 'Unfortunately, this option is unavailable to me... (Can't use native Exchange cmdlets)', you need permissions on the user's mailboxes to do this, if you do not have that permission, there is nothing you can do, regardless of language you try to use. This is an Exchange Admin control. So, you have to get your Exchange Admin to set this ACL.

            – postanote
            Jan 2 at 21:41


















          1














          Why are you doing this using Outlook, VS using native Exchange cmdlets to set the ACL?



          You just grant the Calendar permission role of Reviewer, which is the same thing that provided when trying to set 'Full Details' calendar permission.



          For example.



          Add-MailboxFolderPermission for every Mailbox



          Set-CalendarPermissions # of course this is a script from the gallery, but it's using Exchange cmdlets.



          It's really doing stuff like this...



          # Review permissions
          Get-MailboxFolderPermission -identity 'username:Calendar'

          # Set permissions
          Add-MailboxFolderPermission -identity 'username:Calendar' -user 'personalassistant' -AccessRights Reviewer





          share|improve this answer


























          • Unfortunately, this option is unavailable to me... (Can't use native Exchange cmdlets)

            – Roee Ziv
            Jan 2 at 8:02











          • @Roee Ziv : are you sure? Even users have (by default) permissions to do Get-Mailbox (only returns their own mailbox) or Add-MailboxFolderPermission. Just checked this on my 365 tenant with a regular user account and importing a PS Session gives me 154 cmdlets to use (even in Exchange 2010 you had a lot of CMDlets available to users).

            – bluuf
            Jan 2 at 18:11













          • As for 'Unfortunately, this option is unavailable to me... (Can't use native Exchange cmdlets)', you need permissions on the user's mailboxes to do this, if you do not have that permission, there is nothing you can do, regardless of language you try to use. This is an Exchange Admin control. So, you have to get your Exchange Admin to set this ACL.

            – postanote
            Jan 2 at 21:41
















          1












          1








          1







          Why are you doing this using Outlook, VS using native Exchange cmdlets to set the ACL?



          You just grant the Calendar permission role of Reviewer, which is the same thing that provided when trying to set 'Full Details' calendar permission.



          For example.



          Add-MailboxFolderPermission for every Mailbox



          Set-CalendarPermissions # of course this is a script from the gallery, but it's using Exchange cmdlets.



          It's really doing stuff like this...



          # Review permissions
          Get-MailboxFolderPermission -identity 'username:Calendar'

          # Set permissions
          Add-MailboxFolderPermission -identity 'username:Calendar' -user 'personalassistant' -AccessRights Reviewer





          share|improve this answer















          Why are you doing this using Outlook, VS using native Exchange cmdlets to set the ACL?



          You just grant the Calendar permission role of Reviewer, which is the same thing that provided when trying to set 'Full Details' calendar permission.



          For example.



          Add-MailboxFolderPermission for every Mailbox



          Set-CalendarPermissions # of course this is a script from the gallery, but it's using Exchange cmdlets.



          It's really doing stuff like this...



          # Review permissions
          Get-MailboxFolderPermission -identity 'username:Calendar'

          # Set permissions
          Add-MailboxFolderPermission -identity 'username:Calendar' -user 'personalassistant' -AccessRights Reviewer






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 2 at 21:40

























          answered Jan 2 at 4:30









          postanotepostanote

          3,7942411




          3,7942411













          • Unfortunately, this option is unavailable to me... (Can't use native Exchange cmdlets)

            – Roee Ziv
            Jan 2 at 8:02











          • @Roee Ziv : are you sure? Even users have (by default) permissions to do Get-Mailbox (only returns their own mailbox) or Add-MailboxFolderPermission. Just checked this on my 365 tenant with a regular user account and importing a PS Session gives me 154 cmdlets to use (even in Exchange 2010 you had a lot of CMDlets available to users).

            – bluuf
            Jan 2 at 18:11













          • As for 'Unfortunately, this option is unavailable to me... (Can't use native Exchange cmdlets)', you need permissions on the user's mailboxes to do this, if you do not have that permission, there is nothing you can do, regardless of language you try to use. This is an Exchange Admin control. So, you have to get your Exchange Admin to set this ACL.

            – postanote
            Jan 2 at 21:41





















          • Unfortunately, this option is unavailable to me... (Can't use native Exchange cmdlets)

            – Roee Ziv
            Jan 2 at 8:02











          • @Roee Ziv : are you sure? Even users have (by default) permissions to do Get-Mailbox (only returns their own mailbox) or Add-MailboxFolderPermission. Just checked this on my 365 tenant with a regular user account and importing a PS Session gives me 154 cmdlets to use (even in Exchange 2010 you had a lot of CMDlets available to users).

            – bluuf
            Jan 2 at 18:11













          • As for 'Unfortunately, this option is unavailable to me... (Can't use native Exchange cmdlets)', you need permissions on the user's mailboxes to do this, if you do not have that permission, there is nothing you can do, regardless of language you try to use. This is an Exchange Admin control. So, you have to get your Exchange Admin to set this ACL.

            – postanote
            Jan 2 at 21:41



















          Unfortunately, this option is unavailable to me... (Can't use native Exchange cmdlets)

          – Roee Ziv
          Jan 2 at 8:02





          Unfortunately, this option is unavailable to me... (Can't use native Exchange cmdlets)

          – Roee Ziv
          Jan 2 at 8:02













          @Roee Ziv : are you sure? Even users have (by default) permissions to do Get-Mailbox (only returns their own mailbox) or Add-MailboxFolderPermission. Just checked this on my 365 tenant with a regular user account and importing a PS Session gives me 154 cmdlets to use (even in Exchange 2010 you had a lot of CMDlets available to users).

          – bluuf
          Jan 2 at 18:11







          @Roee Ziv : are you sure? Even users have (by default) permissions to do Get-Mailbox (only returns their own mailbox) or Add-MailboxFolderPermission. Just checked this on my 365 tenant with a regular user account and importing a PS Session gives me 154 cmdlets to use (even in Exchange 2010 you had a lot of CMDlets available to users).

          – bluuf
          Jan 2 at 18:11















          As for 'Unfortunately, this option is unavailable to me... (Can't use native Exchange cmdlets)', you need permissions on the user's mailboxes to do this, if you do not have that permission, there is nothing you can do, regardless of language you try to use. This is an Exchange Admin control. So, you have to get your Exchange Admin to set this ACL.

          – postanote
          Jan 2 at 21:41







          As for 'Unfortunately, this option is unavailable to me... (Can't use native Exchange cmdlets)', you need permissions on the user's mailboxes to do this, if you do not have that permission, there is nothing you can do, regardless of language you try to use. This is an Exchange Admin control. So, you have to get your Exchange Admin to set this ACL.

          – postanote
          Jan 2 at 21:41






















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53998027%2foutlook-object-model%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          Npm cannot find a required file even through it is in the searched directory