0

So the requirement is like this:

  1. Login to o365 portal, navigate to health section ( this url https://portal.office.com/AdminPortal/Home#/servicehealth)

  2. take the screenshot of the page

  3. upload the page in a sp lib/email it

Please suggest ways to accomplish this. I know how to write a script to take the screenshot, but not how to login in message center and upload the screenshot in sp lib.

Note: We have MFA enabled.

1

Here's what you can do .

For accessing the information present in Message Center you need to download Office 365 Service Communications Power Shell Module from Git Hub.

Download the library, and un-zip the file

Now you will need to relocate the module files.

Follow this script below :-

Import-Module Location where you have downloaded your files from git

Add-Type -Path "C:\Program Files (x86)\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll"

Add-Type -Path "C:\Program Files (x86)\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.Runtime.dll"

$User = "tenant.admin@company.onmicrosoft.com"

$Pass = "password"

$cred = New-Object System.Management.Automation.PSCredential($User,(ConvertTo-SecureString $Pass -AsPlainText -Force));

$MySession = New-SCSession -Credential $cred

$Events = Get-SCEvent -EventTypes Message -PastDays 10 -SCSession $MySession | Select-Object Id, Title, StartTime, Service, EventType, Status, @{n='Message';e={$_.messages[0].messagetext}}

foreach ($Event in $Events)

{

$Event.Id $Event.Title $Event.StartTime $Event.Message $Event.Service $Event.EventType $Event.Status

}

Write-Host "Completed!"

This is the way i know to retrieve messages from Message center in O365 tenant.

Notes :- Rather than taking a screenshot i would suggest above approach . You can save this data in csv and maintain a csv date wise for your requirement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.