michevnew / PowerShell

MIT License
229 stars 130 forks source link

Error when running script #23

Open blaired opened 1 day ago

blaired commented 1 day ago

When trying to run Graph_SPO_storage_report.ps1 I get Invoke-WebRequest : A parameter cannot be found that matches parameter name 'ConnectionTimeoutSeconds'.

I've entered the parameters and I'm using permission Sites.ReadWrite.All, which should cover it?

michevnew commented 1 day ago

Hi Mike, the ConnectionTimeoutSeconds parameter is a fairly recent addition and is only available on PowerShell 7.4+. If you are running lower version, just remove the parameter from line 200. There might be other issues if you are running the script on Windows PowerShell, I didn't test it there.

blaired commented 19 hours ago

Perfect, thank you. Updated to 7.4.6 but I have a new error, are you able to point me in the right direction again.

image

michevnew commented 18 hours ago

No such line in the script mate, are you running Graph_SPO_storage_report.ps1 or something else? Seems to be Graph_ODFB_shared_files.ps1, which is a bit outdated. Use Graph_SPO_shared_files1.ps1 instead, a newer version that covers both ODFB and SPO. Details are here: https://www.michev.info/blog/post/6154/report-on-externally-shared-files-via-the-graph-api