How to search in SharePoint Online by powershell?


Hi, we are using SharePoint Online in O365. I am using at this moment Office Dev PnP powershell to get and set data in SharePoint. But now I would like to search in some sitecollection How can I search in SharePoint by powershell?

3 Replies


PowerShell Connect to SharePoint Online
  1. Go to Start in your computer then enter PowerShell in the Search box. You will see Windows PowerShell in the results. ...
  2. If the User Account Control dialog box appears, click Yes to verify that you want to run Windows PowerShell under administrator credentials.

Hope this helps!

You can use Search API in your PS code (if this is what you are asking here)
Is there some example or tutorial to use the search api in powershell?