The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
Automate a PowerShell script that updates information on all SharePoint sites.
Hello
Please i need your help on this issue.
My IT department has a few PowerShell scripts we are currently using to mass update various settings and user information in our SharePoint sites. Outside of running them using Task Scheduler, is there a way to automate them using Power Automate or something similar?
As a quick side question, is there a way to avoid the authentication that occurs when using Connect-SPOService?
I've tried passing in the admin credential, but receive the following error when I do:
Connect-SPOService : One or more errors occurred.
At C:\Users\Kperry\Documents\defaultopen.ps1:46 char:1
- Connect-SPOService -URL $AdminSiteURL -Credential $cred
[Connect-SPOService], AggregateException
- FullyQualifiedErrorId : System.AggregateException,Microsoft.Online.SharePoint.PowerShell.ConnectSPOService
The only way I've had the script succeed is by not passing a credential into the function. Which means I then have to manually select my login credential from the sign-in popup that appears. Without a solution to this, I feel that automating the script would be a bit pointless (as I will have to manually sign in when it runs).
Microsoft 365 and Office | SharePoint | Development
1 answer
Sort by: Most helpful
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
1 deleted comment
Comments have been turned off. Learn more