how to manage my office 365 remotely

Welcome Forums General PowerShell Q&A how to manage my office 365 remotely

This topic contains 1 reply, has 2 voices, and was last updated by

1 year, 8 months ago.

  • Author
  • #79841

    Topics: 5
    Replies: 7
    Points: 0
    Rank: Member

    hello All,

    i am having a problem in connecting my local office 365 and manage things remotely.
    the below scrip works fine when i am trying to connect to my office 365 from my laptop but how do i do if i want to execute the a script 3 times a day when my laptop is off as well.

    so i have to got a management server where i can run my script and here is the problem arises.
    anybody is having any solution here.. i know that i must be missing a very small point here.

    $filepath = "C:\Temp"

    #set outlook to open
    $o = New-Object -comobject outlook.application
    $n = $o.GetNamespace(“MAPI”)

    #you'll get a popup in outlook at this point where you pick the folder you want to scan
    $Account = $n.Folders | ? { $_.Name -eq '' };
    $Inbox = $Account.Folders | ? { $_.Name -match 'Inbox' };
    $f = $Inbox.Folders | ? { $_.Name -match 'SHO' };

    #date string to search for in attachment name
    $email = $f.items.getlast()
    $email.Attachments | %{$_.saveasfile((join-path $filepath $_.filename))}

  • #79885

    Topics: 0
    Replies: 48
    Points: 0
    Rank: Member

    Because your code uses outlook automation you need to install outlook on the management server as well as having your email profile configured. You might want to try something like this using exchange cmdlets.

The topic ‘how to manage my office 365 remotely’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort