22 Replies Latest reply on Aug 2, 2018 5:38 PM by cmazko

    How to use new O365 Templates?

    tdowns

      As mentioned in the release notes:  SAM 6.5 Release Notes - SolarWinds Worldwide, LLC. Help and Support

       

      There are a bunch of new Office 365 templates, but I'm unsure of how to use them.   Mainly, what "nodes" do you assign them too? and what O365 credentials do you need?  I'm finding virtually no documentation on how to use these.  Any help would be appreciated.

      Thanks!

        • Re: How to use new O365 Templates?
          agusst

          When I setup the couple templates I use....I set the node to the poller you're using for the monitoring, and my O365 creds to make the connections.  It was a while ago but I think I needed to install the Azure tools on the poller as well so the powershell commands were available.

           

          I would agree though regarding the documentation...

          • Re: How to use new O365 Templates?
            gundamunit1

            I added portal.office.com as a node and assigned these templates to it.

            But problem is that when I look at Mailbox Sizes which is part of the Microsoft Office 365 Exchange Mailboxes template, it says "No mailboxes found".

            So I must be doing something wrong.

             

              • Re: How to use new O365 Templates?
                tdowns

                Right.. I'm still having problems too.   I tried the instructions here: Monitoring Microsoft Office 365 with SAM

                 

                Using "api.admin.microsoftonline.com" as the external node URL.

                 

                What I get during the check credentials step is a bunch of Green "up" status sections, but the data is mainly missing (i.e. "NoDataAssumingUp") or commandlet errors:

                 

                Errors: ==============================================

                Connect-MsolService : The term 'Connect-MsolService' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

                At line:100 char:5

                + Connect-MsolService -Credential $cred

                + ~~~~~~~~~~~~~~~~~~~

                  + CategoryInfo : ObjectNotFound: (Connect-MsolService:String) [], CommandNotFoundException

                  + FullyQualifiedErrorId : CommandNotFoundException

                 

                I've used my own credentials as a test, since I have done so successfully in the past.  I'm assuming that the PS Directory Module is not loading as part of the template... anyone know how to fix this or actually get any of these templates working like the documentation shows?

                Many thanks!

                Ted

                  • Re: How to use new O365 Templates?
                    gundamunit1

                    I created a ticket with support on this but it seems to not help.

                    They're saying that the reason this template is not returning any data is because the node does not have powershell 2.0.

                    But this node is not one that I control. So it seems to be useless templates.

                    • Re: How to use new O365 Templates?
                      bszweda

                      I'm trying to use this template and I get "100 NoDataAssumingUp" on every component in every template I try with a variety of user accounts. When I look at the details of the test results I get:

                       

                      I was getting similar code and realized my credentials were incorrect

                       

                      I was using my username instead of username@domainname  after I made the change things started working.

                  • Re: How to use new O365 Templates?
                    HerrDoktor

                    Just let the monitor run against your OrionCore Server... that's what I do.

                    When you take a closer look in the script details, you see that it is importing a session from O365

                     

                    Function Connect-ExchangeOnline {

                        $global:office365 = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential ${CREDENTIAL} -Authentication Basic -AllowRedirection -WarningAction "SilentlyContinue"

                        Import-PSSession $office365 -WarningAction "SilentlyContinue" | Out-Null

                    }

                     

                    Hope that helps

                    • Re: How to use new O365 Templates?
                      HerrDoktor

                      When thinking about it I did have another Idea

                       

                      what did you enter as execution mode, Local Host or Remote host. I believe in your case this needs to be "local host"

                       

                      Cheers,

                      Holger

                      • Re: How to use new O365 Templates?
                        mesverrum

                        What node you assign these components to is really irrelevant.   Some people create a node pointed at the o365 gateway servers, but you could really use anything as a sort of placeholder.

                         

                        Looping in  mrxinu , since he knows more than anyone about the setup of these scripts.

                        • Re: How to use new O365 Templates?
                          dgilchrist_lum

                          I am having the same issue while using the Office 365 template: "The term 'Connect-MsolService' is not recognized as the name of a cmdlet, function, script file, or operable program."

                           

                          Based on the conversation above, I'm wondering if the version of PowerShell that are installed on the "target" server matter, or if it's only about the version of PowerShell on the Orion application server. Can someone clarify and confirm this? Thanks.

                          • Re: How to use new O365 Templates?
                            solarwinds456

                            I am also struggling to get this working.  I have tried both adding an external node and using my main Orion server. I continue to get "No mailboxes found" as well as an error stating I have to many concurrent runspaces currently connected (I have none other than this Orion monitor) and I need to close existing runspaces before connecting.

                             

                            Fail to create a runspace because you have exceeded the maximum number of connections allowed : 3 for the policy party : MaxConcurrency. Please close existing runspace and try again.

                            • Re: How to use new O365 Templates?
                              joelgarnick

                              I got them working, but here's what i did to figure it out...

                              If you copy the script out of each component monitor and paste it into your favorite text editor you can edit the script so you can run it directly in powershell (basically this boils down to changing how the script handles credentials since the ${Credential} variable is a Orion specific variable):

                               

                              There are 2 basic substitutions/edits to look out for:

                              1)  Replace:

                              Function Connect-ExchangeOnline {

                                   $global:office365 = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential ${Credential} -Authentication Basic -AllowRedirection -WarningAction "SilentlyContinue"

                                   Import-PSSession $office365 -AllowClobber -WarningAction "SilentlyContinue" | Out-Null

                              }

                               

                              ...with:

                               

                              Function Connect-ExchangeOnline {

                                   $Credentials = Get-Credential -Message "Enter your Office 365 admin credentials"

                                   $global:office365 = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Credentials -Authentication Basic -AllowRedirection -WarningAction "SilentlyContinue"

                                   Import-PSSession $office365 -AllowClobber -WarningAction "SilentlyContinue" | Out-Null

                              }

                               

                              2) Replace:

                              $c = Get-Credential -Credential ${CREDENTIAL}

                               

                              ...with:

                              $c = Get-Credential

                               

                              In both cases this will result in a popup when you run the scrip that will allow you to authenticate to you o365 account.

                               

                              So, what i did was copy each script out to a text editor, make the credential changes outlined above, then pasted the script into powershell on my laptop and ran a timer to get a sense of how long each script takes to execute.  Record the results for each component monitor, add them up to get the total execution time for the full application template, then make sure you set your timeout and polling frequency accordingly.  Times ranged anywhere from a few seconds to 42 minutes for one of them.

                               

                              Running the scripts locally outside of Orion can also give you a better sense of what information they gather, what error messages you may get, etc.  There are a few that will generate an error message but will still fully execute and display data.  I noticed this with the ones that start with "$totalResults = $args.Get(0)" ....so keep in mind there are some warnings or errors that don't actually impact the functionality of the monitor.

                               

                              The ones that return "NoDataAssumingUp" i'm assuming are checking for features that are not relevant to my specific account, but i could be wrong with that.  I ran across another post that mentioned that option was put in there to account for Microsoft frequently changing around how things are setup...so they could also be templates that just need to be updated based on whatever Microsoft has changed since the template was originally written.

                               

                              Anyway, hope this helps a person or two...

                              1 of 1 people found this helpful
                              • Re: How to use new O365 Templates?
                                cmazko

                                We recently added articles about SAM's Office 365 templates to the SolarWinds Success Center. You can access them via this link: Using Microsoft Office 365 templates.

                                All feedback is welcome!

                                1 of 1 people found this helpful