This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Office 365 Service Health Status

So we have been using the Office 365 Service Health Status and it was been working great up until a few days ago. On the application status page we are getting this error

"PowerShell script error. Scripting Error: Script does not contain the expected parameters or is improperly formatted. 'Statistic' missing."

however, when you go in and run the powershell script on the edit application monitor page. It gets results back. Has anyone else seen this behavior? or have an idea on how to fix it?

Thank you.

Parents Reply Children
  • Greetings.  I have run into this same issue but I am a bit confused at what was added to the PS script to fix it.  I added the $stat=[int]$stat to the script and it works but I am stuck at it returning the 0.  I tried adding the f ($Status.status -match "PostIncidentReviewPublished") {$Stat = 98} to the script and it still returns 0.  What am I missing here?  Thanks!

  • , run the script in PowerShell ISE from the polling engine conducting the polling, once it is completed in the terminal run $Status.Status, it'll then output the returned status from Microsoft, you need to ensure there is a match for it in the block that takes the String data and converts it to an integer. If the string returned is ServiceInteruption then 0 would be an accurate integer because that's what the conversion is calling for. 

  • I am a huge novice in PS. I tried running it but it did not like something.  We patched this server over the weekend and that seemed to be part of this issue 2016 KB5008207.  Adding $stat to the script seemed to fix it but all I can get as a return is 0.  I think I am more confused now than when I started.  Thanks for your help!!!

  • , you're probably missing what you would've added as script arguments or credentials to it when running it in ISE, that's something I see forgotten quite often. make sure whoever it is referencing a credential or script argument you are filling in the appropriate data and try it again.