To run a Rest call against SharePoint Online from PowerShell, we can use this simple script, inspired from

All you need to do first is, install the SharePoint Online Client components or the SharePoint Online PowerShell extensions and copy the files Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll to the same directory as the script below.

A sample could look like this: .\RestAgainstSharePointOnline.ps1 -Url https://{yourtenant} -UserName {youruser} -Password {yourpassword}