none
Having trouble getting a powershell script to execute RRS feed

  • Question

  • I am not a .NET developer, so, this is unfamiliar territory-

    I got a ps1 script that is meant to pull calendar events from your office 365 outlook calendar. From what I can tell it authenticates your powershell session to connect to outlook... and the auth is popping up, but then it just stops dead. I have no idea how to debug this.

    It's on github, user is lazywinadmin, repo is O365-Get-O365CalendarEvent (I can't paste links here yet)

    The readme on github includes the command you would run, but other than that, essentially no instructions on how to use it.

    I have changed the windows permissions to allow scripts to run, but I what would normally work for a ruby or python or other script is not getting me there.

    Is there some other thing I need in order to make this work? Or, perhaps, has the office API moved on and this code is deprecated?

    Thank you in advance for any assistance.

    Friday, February 14, 2020 10:55 PM

All replies

  • It kind of hard to help you if you can't provide an error message, the code that is failing or instructions on how to get the code.

     
    Friday, February 14, 2020 11:48 PM
  • Sorry but this is not a GitHub forum.  You will need to post issues with GitHub component t6o the author on GitHub.

    I also suggest that you read the help for the CmdLet.  To learn how to us PowerShell you will have to find a book or a tutorial.

    This forum does not support scripts that non-Windows people have found on teh Internet,

    https://github.com/lazywinadmin/PowerShell/tree/master/O365-Get-O365CalendarEvent

    You also need to take some time to learn how to ask a technical question. 

    I did look at the code.  It is quite amateurish but its use is quite well described,  Did you even read what was posted?

    Most of your issue is because you have no experience or training in PowerShell.  The other thinking you are missing is any training in O365 and its API.  The code delivered is mostly unnecessary other than it provides the URI needed and a method for creating it.

    The code posted has detailed instructions and many examples.  Please take the time to learn how to use all of these things like GitHub, )365 Rest API and PowerShell.  Once you have enough of the basics and you still have issues then post back with your script and a clear question about the issue.

    I can also note that the code is very old.  O365 API has been changed many time since.  I suggest that once you learn O365 you will not want to us the script.  I also suggest that you may also have issues with MFA which will require you to take the time to set up O365 for API access.

    I can also note that there are some serious design deficiencies in the code.  Under many normal sets of parameters the code will fail.  Even when it works it can take a very long time to execute.

    Without you understanding PowerShell or how programmed systems work it is not possible to know how to advise you further.  The examples in the help are explicit.  When you learn basic PowerShell they will make sense.  If you have issues with you tenancy then you will need to contact O365 support for help.  

    Also the script was written to teh Outlook Rest QAPi 1.0.  We are now using the 2.0 version and the 1.0 version will not likely work with current mail searches.

    Here are the docs for the current 2.0 API: https://docs.microsoft.com/en-us/previous-versions/office/office-365-api/api/version-2.0/mail-rest-operations


    \_(ツ)_/

    Saturday, February 15, 2020 12:05 AM
    Moderator